Hello, I try to retrive the polygon-data of the boundaries of cities in germany. I need to process these data in php. My first approach was to send a request to Nominatim and retrieve JSON data in return. See this example: https://nominatim.openstreetmap.org/search.php?q=papenburg&polygon_geojson=1&format=json But I red the usage policy of the Nominatim project and it seems to me that it is adverse to send automatic requests (out of my php script) to Nominatim. Afterwards I read about PBF Files and XML-Files and how to access the data, but it all seems to be much more complicated and I am not even sure if this would give my finally the information I need. Is there any easy access to this data - or does anybody know which approach would be the best to retrieve the data I am looking for? Thank you in advance! asked 06 Mar '19, 14:59 frlln |
Have a look at https://wambachers-osm.website/boundaries/ In the left-pane navigation you can use right-mouse-click to select multiple levels. Countries are marked (2), states (4), cities can (6) or (7) depending on type (Bavaria markt, kreisfrei etc). https://overpass-turbo.eu/ is also powerful. Zoom to the desired area and search for 'relation"admin_level"="6";' example https://overpass-turbo.eu/s/GI8 From inside a script you can query the API directly https://wiki.openstreetmap.org/wiki/Overpass_API answered 06 Mar '19, 15:14 mtmail |