[OSM-talk] Distribution of OSM ids could be much more useful!

Paul Norman penorman at mac.com
Sun Nov 25 14:36:39 UTC 2018


On 2018-11-25 5:50 AM, Victor Shcherb wrote:
> What do you think?

It would be terrible for most software that I am aware of that can 
process the full planet. Current assumptions about density would be 
broken, vastly inflating memory usage and slowing down processing.

The benefits aren't great as I see them. Using a z-order curve encoded 
in the first 30 bits will help cache locality, but like all z-order 
curves, it doesn't guarantee that two nearby places in 2d space have 
nearby places on the curve. This means that an implementation still 
needs to be able to search through the nodes for nearby ones.

Two other problems come to mind. The first of these is implementation. 
IDs are a PostgreSQL bigserial, and to write something custom that 
assigns IDs based on location would be difficult as it would need to get 
MVCC right. The second is the number of bits. Some software is limited 
to 53-59 bits, and other to 63 bits. We're using about 75% of 33 bits 
right now.



More information about the talk mailing list