This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How id of nodes, ways and relations forms?

1

I want to add some nodes, ways, relations into downloaded osm xml. Are there any hierarchie?

asked 14 Jun '17, 13:36

Edd1337's gravatar image

Edd1337
41446
accept rate: 0%


One Answer:

3

If you're adding objects that are not present in database, you want to use negative integers for them. That's the convention for "object does not exist in database, is to be created".

answered 14 Jun '17, 14:14

Piskvor's gravatar image

Piskvor
1.3k91535
accept rate: 37%

1
(14 Jun '17, 14:20) scai ♦

But what about generating ids by myself, without sending to the server?

(14 Jun '17, 15:06) Edd1337
1

Indeed. You generate the negative IDs yourself. You don't need to send them to server at all, if you don't want to add them to OSM.

(14 Jun '17, 15:11) Piskvor

Source code available on GitHub .