Overpass-API
Overpass-API copied to clipboard
Cannot get areas inside area
Is looked at other discussions on this tic but could not resolve my problem.
I want to get all town areas within specific area. I found out that it is not possible to get areas inside area but that there is workaround.
Workarounds are based on filtering areas on other properties. I have problem that I need all areas that are place=region and have nothing else to filter them out.
I tried this:
[out:json][timeout:25]; area["ISO3166-2"="BA-SRP"] -> .country; rel(area.country)[place="town"]; map_to_area; out meta;
I got nothing.
Then i tried
[out:json][timeout:25]; area["ISO3166-2"="BA-SRP"] -> .country; rel(area.country)[place]; map_to_area; out meta;
This showed only few areas, all but one place=region. Areas place=town are missing completely. That explains why I got no areas of place=town in previous query.
This is where I got to the point I have no idea what to try more.
Please note that this Github issue tracker is primarily intended for bug reports and enhancement requests. Your question is more of a HOWTO type which would be better served on https://help.openstreetmap.org/
You seem to assume that there are many relations with "place=town" in that area. That's not the case, most of those are in fact nodes, for which no area exists on the Overpass server. https://overpass-turbo.eu/s/IQZ