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

As we know each element has element ID assigned to it. On what basis 64 bit element ID's are assigned. Does element IDs have any structure. Where can i find more details about Element ID generation and its structure.

asked 27 Sep '19, 06:48

Amruthesha's gravatar image

Amruthesha
16223
accept rate: 0%


The element IDs (node, way, relation IDs) are assigned by the PostgreSQL database on the central OpenStreetMap server. The API code merely tells the database to "save" a new object with an ID of NULL (e.g. for a new node, the relevant code line is https://github.com/openstreetmap/openstreetmap-website/blob/master/app/models/node.rb#L270) and then the database assigns a new ID based on a PostgreSQL "sequence" (cf. https://github.com/openstreetmap/openstreetmap-website/blob/master/db/structure.sql#L1470).

These IDs have no structure or meaning altogether.

permanent link

answered 27 Sep '19, 07:33

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 27 Sep '19, 07:34

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:

×55
×4
×3
×3

question asked: 27 Sep '19, 06:48

question was seen: 1,903 times

last updated: 27 Sep '19, 07:34

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