NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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


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

permanent link

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×128
×92

question asked: 07 Dec '18, 15:47

question was seen: 4,157 times

last updated: 13 Dec '18, 16:55

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum