drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
693 stars 90 forks source link

Uncertainity using `map_to_area` when analyzing playgrounds #630

Open ltog opened 2 years ago

ltog commented 2 years ago

I try to analyze playgrounds that have been micromapped using playground=* tags inside them.

I wrote the following query to achieve this.

[out:json][timeout:60][bbox:{{bbox}}];

wr[leisure=playground];

map_to_area -> .pgs;

nw(area.pgs)[playground] -> .equips;
.equips out; .equips >; out geom;

(see https://overpass-turbo.eu/s/1aTs )

I expect that it also would return playground=* elements from the two playgrounds in the south east. Why doesn't this happen? Is my query erroneous (quite probable) or is this a bug in the Overpass API (probably not)?

mmd-osm commented 2 years ago

This issue seems to be a duplicate of #77. Unfortunately, the official Overpass instances don't support this scenario yet.

In the meantime, you can use this prototype: https://overpass-turbo.eu/s/1aTz or this one: https://overpass-turbo.eu/s/1aTA

ltog commented 2 years ago

In the meantime, you can use this prototype: https://overpass-turbo.eu/s/1aTz or this one: https://overpass-turbo.eu/s/1aTA

@mmd-osm : That seems to work fine. Thank you! :-)

However, I still don't understand why the results of my original query differ between different playgrounds. Shouldn't all of them return results (or none of them)?

mmd-osm commented 2 years ago

It has to do with area creation rules on the server.

A few links worth reading:

mmd-osm commented 2 years ago

You can also have the opposite kind of query, finding playgrounds without micro-mapping: https://overpass-turbo.eu/s/1bkE

drolbr commented 2 years ago

For ways, the problem has been solved by version 0.7.57.