[pgrouting-users] osm2pgrouting fails with 32-bit-IDs

Max Berger max at dianacht.de
Sat Mar 2 01:39:59 PST 2013


Hi,

since February 2013 OSM is using Node IDs with unsigned 32 bit and
osm2pgrouting fails importing these nodes. All nodes with ID>2147483647
get the coordinates of the first node with 32-bit-ID.

The declaration of all relevant variables is "long long", thats ok. But
in some parts of "OSMDocumentParserCallback.cpp" "atol()" is used to
read IDs from XML-Files into these variables and that is returning
"signed long" with only 31 bit and one bit for the sign.

Substituting "atol()" with "atoll()" in  OSMDocumentParserCallback.cpp
helped for me. But I'm not sure if I can find all the places where IDs
are converted. So perhaps someone with more experience could pleas have
a look and try to patch osm2pgrouting.

Thanks a lot,

Max





More information about the Pgrouting-users mailing list