This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

How to query for OSM Relation ID and generate custom polygon for each OSM Relation ID?

0

I am trying to get a custom polygon for a list of locations. To get the polygon for each item first I need to find each items OSM Relation ID using the searchbox in the https://www.openstreetmap.org and then run that OSM Relation ID through the tool http://polygons.openstreetmap.fr/. That tool will then generate a polygon to the size I am looking for: http://polygons.openstreetmap.fr/get_poly.py?id=1216769&params=0.005000-0.002000-0.002000

I would like to query through the OSM Relation database and automatically generate the polygon with the given polygon parameters for each OSM Relation ID retrieved from the query.

Is there a way to automate this process? Where can I find the database that contains the OSM Relation ID and its properties ? Is there an offline tool to convert the OSM Relation ID to my size polygon?

For example: I would like to get the polygon for Miami. To get it I would have to first search the OSM Relation ID of Miami which is 1216769. Then I would use the following link with the id: http://polygons.openstreetmap.fr/get_poly.py?id=1216769&params=0.005000-0.002000-0.002000

asked 07 Dec '18, 15:47

the_alamo's gravatar image

the_alamo
11112
accept rate: 0%

edited 07 Dec '18, 16:04


One Answer:

3

Alternatively, you could use https://wambachers-osm.website/boundaries/ to download polygons for administrative boundaries.

answered 09 Dec '18, 07:14

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

1

This is extremely helpful, I can use this as a workaround for now. My only issue with this tool in particular is that I cannot modify the level of detail generated by the export.

(13 Dec '18, 16:55) the_alamo