Overpass API developpement

Text archives Help


Re: [overpass] Date ranges with Overpass API


Chronological Thread 
  • From: mmd <mmd.osm@gmail.com>
  • To: overpass@osm101.openstreetmap.fr
  • Subject: Re: [overpass] Date ranges with Overpass API
  • Date: Thu, 8 Dec 2016 23:17:08 +0100

Hi Roland,


thank for you the detailed feedback. I started testing some of the
features you described and found a few minor issues so far. Do you plan
to release a preliminary version of the documentation soon? It think
that would be really helpful for a more comprehensive testing.

Here's a short summary of my tests so far:


Test 1: Ways with single node only
----------------------------------

way(if:count(members)==1)({{bbox}});
out center;


-> ok


Test 2: Relations without tags / member
---------------------------------------

Test 2a: (global), without bbox

rel(if:count(tags)==0);
out;

rel(if:count(members)==0);
out;


-> result not conclusive: no result, no error message returned


Test 2b: adding bbox

rel({{bbox}})(if:count(tags)==0);
out;

-> result ok



Test 3: omitting [..] for tags, multiple (if: ...) in one query
---------------------------------------------------------------


way[maxheight][maxwidth](if:maxheight > 2)(if:maxwidth > 2);
out geom;

-> no error message/parsing error returned

Similar: is_num(layer) -> no error message!


Test 4: Comparing tags within same query
----------------------------------------

[bbox:{{bbox}}];

way[maxheight][maxwidth](if:is_num([maxheight]) && is_num([maxwidth]) &&
[maxheight] > [maxwidth]);
out geom;


-> test ok


Test 5: Nodes with at least one tag
-----------------------------------

[bbox:{{bbox}}];

node(if:count(tags)>0);
out geom;

-> test ok



Test 6: Count way's nodes
-------------------------

[bbox:{{bbox}}];

way(if:count(nodes)>1);
out geom;


-> no result, does not seem to work



Test 7: Invalid layer tag
-------------------------

[bbox:{{bbox}}];


node["layer"](if:!is_num([layer]) || ([layer] < -5 || [layer] > 5));
out;

-> test ok
(some layer tags have multiple values "1;0" -> not numeric)


Test 8: unknown function
------------------------

[bbox:{{bbox}}];

node["addr:housenumber"]
(if:is_odd(["addr:housenumber"]));
out;

-> ok. Error message shown: parse error: Function "is_odd" not known


cheers
mmd






Archive powered by MHonArc 2.6.18.

Top of page