Question

I'm trying using of OpenStreetMap API 0.6. API is straight-forward, but I couldn't find any numeric range limit information from their documentations.

The only mentions about numeric range limitation I could find are here.

  1. element IDs are non negative, http://wiki.openstreetmap.org/wiki/OSM_XML
  2. ID is integer, http://wiki.openstreetmap.org/wiki/Data_Primitives

Because my code is targeting mobile platform, I want to optimize my code for memory space. Now I'm using 64-bit integers for many cases (actually this is also just an assumption), which is not good when considering amount of data.

Where can I find the numeric limits?

Was it helpful?

Solution

IDs for nodes/ways/relations have to be 64 bit. 32 bit node IDs are expected to run out somewhere between the first and second quarter of 2013.

Also there is no upper limit for any ID as they will be never re-used.

The most-recent discussion on the 64 bit node ID issue is this one.

Update: Just for the record OSM now has node IDs larger than 32 bit since February 2013.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top