Until now, I assumed that an OSM relation is always in its Overpass area counterpart. For example, the relation 1682152 is returned when searching for administrative boundaries in the area 3601682152, as evident in this Overpass query.

However I have found several relations where this is not the case. For example, the relation 1682200 is not returned when searching in its area 3601682200, as evident in this Overpass query.

Are there specific rules on when an OSM relation is in its own Overpass area (provided the area exists)?

1 Answer 1


Area creation rules are described in https://github.com/drolbr/Overpass-API/blob/master/src/rules/areas.osm3s

Every object matching this query will have a corresponding Overpass area object that can be used for querying.

  • I know of the area creation rulkes, however I don't know what the conditions are that the relation is returned in a query on the area that was created from that relation. Let's say the relation 12345 and its area 3600012345 exist. I now run the query area(3600012345)->.a; rel(area.a);. Sometimes the relation 12345 is returned, sometimes not. Under what conditions is the relation returned?
    – Sven G.
    Dec 12, 2020 at 21:49
  • 1
    In your case, relation 1682200 and area 3601682200 both refer to the same underlying relation 1682200. However, the area filter ignores any object on the outer boundary itself. Because relation 1682200 does not have any nodes or ways strictly inside the area, you won't get a result in this case.
    – mmd
    Dec 13, 2020 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.