Covering areas / enclosing polygons with API query is_in and JOSM

Is possible to download in JOSM the enclosing polygons (aka covering areas) of a particular point?
What would be the easiest workflow, either using API or directly in JOSM?

http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Query_for_areas_.28is_in.29
Also see: http://stackoverflow.com/questions/21188099/open-street-map-enclosing-polygons

first be aware: the so called is_in tag is not used everywhere on the planet, and there are people who say that using is_in= is deprecated.

Do you mean something similar like the “New Query Feature” on osm.org that was implemented in Dez. 2014? https://blog.openstreetmap.org/2014/12/01/new-query-feature/

besides the tags of the map object itself, there is an output about all “areas” where it is located in.

As far as I know there is NO such feature in JOSM.

If you want such a feature, ask in JOSM mailing list or / and open a detailed feature request on JOSM trac system.

The Overpass query would be something like


is_in(50.73322,7.09828);
relation(pivot);
(._;>;);
out meta;

You can copy this into Overpass turbo and click Export and raw data directly from Overpass API. Then rename the downloaded file to data.osm and open in JOSM.

There is also a plugin called mirrored downlaod which allows to enter Overpass queries directly in JOSM, but I don’t know how it works.

Thank you for your help, it is much appreciated.

I think the ‘tag’ is_in from OSM database and the ‘Query for areas’ is_in from Overpass API/Overpass QL are two different things. If I understand correctly I am interested in the Overpass query, not in the tag.

Yes very similar. The query (example) provides Nearby features and Enclosing features. Enclosing features are just what I am looking for.

I was able to reproduce the same kind of queries with http://overpass-turbo.eu/s/6St

is_in(48.8610,2.3358);
out ids|body|meta;

I need now the last step to load the found objects into JOSM, as batch/automatic if possible. I could not do it when I tried to reproduce the method proposed by bastik. I could not export from Overpass to JOSM or run the Overpass Query from JOSM/File/Download with Overpass API.
If this is not possible at all, I would like to understand what is missing in order to open a clear feature request.

Ok, I did mix up that thing with is_in …

and indeed I have no usable result when running your short query in overpass-turbo … it gives back only a kind of raw data, and no data display on the map … when choosing the export feature to load the result in a running instance of JOSM with remote feature activated there, no daata is loaded in JOSM.

Looking in the raw data from overpass-turbo, it seems that all “areas” have an ID starting with 36… which is a sign for the internal number of areas in overpass-api.

See http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Map_way.2Frelation_to_area_.28map_to_area.29 for details.