[JT] Jochen Topf's Blog
Sun 2010-12-19 00:00

OSM Node IDs

The OpenStreetMap database currently contains nearly 900 Million nodes. Because some nodes have already been deleted the highest node ID is already past 1 Billion. IDs in the database are already 64 bit wide so that space will not run out. But lots of software only uses 32 bit IDs. There recently was a question on the German mailing list when the 32 bit would run out, so I want to give some answers here.

Here is a graph showing the growth since mid 2009:

In the upper part of the graph you see the absolute numbers for the number of nodes (red line), the highest ID (gray line) and the number of nodes that have at least one tag (black line). In the lower part you see the nodes added per hour (red line) with an average of nearly 50k (gray line).

If the trend keeps going we will have 2 billion nodes in a year or so. At that point a signed 32 bit integer will wrap around. So if you are writing software for OSM you should start thinking about this. You have some more time if you use unsigned integers, but sometimes negative IDs are used for not-yet-uploaded OSM data, so keep that in mind.

Tags: openstreetmap · osmdata