Hi, I'm trying to parse PBF country file and I'm having trouble interpreting node ids. They should be 'delta-encoded', but for each DenseNodes group they go from 0 to 8000. Since there are many DenseNodes groups in the file, this results with many duplicate IDs. If I understood the PBF format description correctly, where it says "x_1, x_2, x_3, I encode x_1, x_2-x_1, x_3-x_2, ...", the first node ID should be a 'real' node id, and the subsequent ones should be delta-encoded. Can someone shed some light on this? Thanks asked 12 Jan '16, 13:52 zepe aseerel4c26 ♦ |
First, you should probably not try to re-invent the wheel and use one of the existing libraries to read PBF files. Getting all the corner cases right isn't as easy as it looks. There are libraries for several languages available. (Shameless plug: if you use C++ I can recommend my libosmium.) If you still want to do your own you can still look at those implementations to help find your problem Second: Your interpretation is right. I guess your code is doing something different than that. answered 12 Jan '16, 14:15 Jochen Topf mmd |