Hello from Italy! I'm pretty new in OSM. I'm trying to highlight the boundaries of an area determineted by a list of cities. I know that every city have a relation number and I know how to extract the boundaries of a single city (using nominatim or geojson.io that looks better for me), but how can I combine multiple cities in one single map? LIST EXAMPLE: Milano (relation 44915) Corsico (relation 44993) Rho (relation 44993) Sometimes the list is longer than 30 cities. Is there a way to make this? Thanks! asked 05 Apr '19, 23:05 volo86 |
Overpass-API is a straightforward way to retrieve the data, using a simple script that just asks for each relation:
Overpass Turbo adds several export formats for data retrieved from Overpass-API, check the export button there. You could pick a suitable one and load that into geojson.io or such. answered 07 Apr '19, 13:06 maxerickson oh thanks! it was so easy (for who know what is doing). Thanks again! Any hint about how to automatically retrieve relation id starting from city name?
(08 Apr '19, 08:20)
volo86
(08 Apr '19, 09:12)
scai ♦
ok, I understand that but I was wondering if is possibile to write the same code using the name of the city instead of the relation id (or create a spreadsheet where in column A I write the name of the city and in column B appear the rel id)
(08 Apr '19, 16:08)
volo86
1
Something like http://overpass-turbo.eu/s/HO5 The assumption that the cities you are looking for all have an admin_level=8 tag may break down. The .searchArea stuff restricts the results to matches inside of Italy.
(08 Apr '19, 17:23)
maxerickson
|
I am practicing with turbo overpass but I can't understand how to manage city names with the apostrophe or composed of two or more words (for example "Villa Sant'Angelo"). If I write "rel [admin_level = 8] [name = Villa Sant'Angelo] (area.searchArea);" overpass gives me an error. any suggestions? thank you Edit: I understand that I need to replace spaces with underscore, but the problem remain for apostrophe. answered 24 Apr '19, 08:15 volo86 |