drolbr / Overpass-API

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

Areas - closed ways: meaning of `area=no` in 0.7.57 #635

Closed mmd-osm closed 2 years ago

mmd-osm commented 2 years ago

In the past, area creation rules have excluded closed ways with an area=no tagging. This makes sense for objects like a raceway (https://www.openstreetmap.org/way/118131873), where we don't want to describe an area when using a closed way.

Now on api_new_feat/ I still see the raceway as part of the result, which is somehow unexpected and feels a bit inconsistent to how areas used to work in the past.

is_in(-43.303335587207606,-65.27491450309753);
out geom;

By the way, the raceway would still show up as linestring in overpass turbo due to the area=no tagging:

rw

drolbr commented 2 years ago

While it might feel inconsistent to the past way, it is in line with begin tag agnostic. You can of course restrict to only ways without that tag in a totally generic way:

is_in(-43.303335587207606,-65.27491450309753);
area._[area!=no];
out geom;
mmd-osm commented 2 years ago

As long as we don't have a dedicated area type in OSM (not Overpass), following a tag agnostic approach is probably not in line with how areas are defined in the wiki and might lead to some surprising results.

https://wiki.openstreetmap.org/wiki/Key:area explicitly includes those tags to define what's an area and how to deal with uncertainties. https://wiki.openstreetmap.org/wiki/Area on the topic:

Note that areas are not distinct data primitives and some closed ways (for example landuse=*) are assumed to be areas, but others, such as highway=footway are not, being treated as linear features instead, except when there is also an area=yes tag.

In any case, I would propose to be clearly communicate this in the release notes / QL wiki page as incompatible change.