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

Are node ids unique in the planet osm data? If not, are they unique for a geography such as country?

When a node is added to a way, does that change the osm_id of the remaining nodes?

asked 11 Jul '19, 20:02

Maneesh's gravatar image

Maneesh
26224
accept rate: 0%


Node IDs are indeed unique.

Note however that node IDs, way IDs and relation IDs are separate spaces, so node 537, way 537 and relation 537 can co-exist.

permanent link

answered 11 Jul '19, 20:31

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

Answering your second question, no, object IDs aren't dynamic. An existing object (be it a node, way or relation) will keep the same ID unless it gets deleted and recreated as a new object.

Object IDs aren't necessarily static, though. Like I said above, someone could delete an OSM object and create a new object representing the same real-world item, which would now have a different ID. If you're wondering if you can use the OSM ID to refer to a POI, the answer is that this may work in the short term, but it isn't guaranteed to always work because someone could change the data at any point.

permanent link

answered 11 Jul '19, 22:42

alester's gravatar image

alester
6.6k266100
accept rate: 28%

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:

×205
×91
×10

question asked: 11 Jul '19, 20:02

question was seen: 2,599 times

last updated: 11 Jul '19, 22:42

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