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, 20:02

Maneesh's gravatar image

Maneesh
112
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, 20:31

Richard's gravatar image

Richard ♦
27.6k40244366
accept rate: 19%

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, 22:42

alester's gravatar image

alester
5.1k25276
accept rate: 29%

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:

×153
×82
×6

question asked: 11 Jul, 20:02

question was seen: 68 times

last updated: 11 Jul, 22:42

powered by OSQA