Hi everyone,

I have created around 100 protected areas in Iran over last few months, in order to complete the wiki page regarding these areas, I want to show them in a list with their name and OSM ids in the wiki page. Is there a way to extract Ids of objects in a .osm file? or even better is there a query which can be used to list object's Id based on a specific search criteria?

By the way I have tried Spatial Manger it shows all the tags except Ids.

Thanks

asked 13 Sep '16, 08:49

Adib%20Yz's gravatar image

Adib Yz
276101219
accept rate: 0%


Use overpass turbo and enter “boundary=protected_area in Iran” in the wizard. You'll have the data displayed on a map, and the corresponding json on the "data" tab. You can export that to a format of your liking.

Optionally, replace the "print results" section with "out ids;" so that only ids are returned (ignore the "repair query" suggestion). That might make parsing the data easier.

permanent link

answered 13 Sep '16, 11:09

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
16.9k15147242
accept rate: 19%

2

Also, avoid linking to object id's whenever possible. See http://wiki.openstreetmap.org/wiki/Overpass_API/Permanent_ID

(14 Sep '16, 14:23) joost schouppe
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:

×105
×33
×4

question asked: 13 Sep '16, 08:49

question was seen: 1,080 times

last updated: 14 Sep '16, 14:23

powered by OSQA