Getting parent way object

Hello everybody :slight_smile:
I tried this for a long time now and don’t know if its even possible.
I need to get the parent way-Object of current position through an api like overpass.
It is possible to get the areas through following code-snippet:

<coord-query {{center}}/>

If I want to get the way-Objects I could make the trick by defining a box with following expressions:

way["landuse"]({{bbox}});(._;>;);out;

But if the Box is to small it doesn’t return the parent way-Object. And it isn’t save that the current position lies over the way-Object.

Does anybody know a solution?

Thank you very much

To ensure that I understand the question: You want, for a given coordinate, know all closed ways that enclose this coordinate?

You can achieve this approximately with a query like


is_in(51.446,7.011);
( way(pivot);
  >;);
out;

This finds all ways around the given coordinate that are considered to be an area, i.e. ways with a name tag and some kind of area tagging.
The full list of what is considered area tagging is effectively in this file: https://github.com/drolbr/Overpass-API/blob/master/rules/areas.osm3s.

By contrast, I’m sorry to must tell you that it isn’t possible in full generality (also for closed ways that doesn’t have area tagging) by Overpass API.

This helps me much! Thank you!
My aim is to receive information about the users underground (tagged by the landuse - attribute). Is there any other api or possibility to get this information?