I'm parsing OSM XML data into c#. I have a weird problem, each node has an id that is a long datatype. When parsing, if the id is 9 or less digits long, it seems to work just fine. However once it reaches 10 digits long, for some reason I start to get negative number from the parsing. Is there a reason for why this might be. I'm using a library called OSMSharp for parsing. Language is c#. An example of this: This way has 2 nodes:
After being parsed, I get this: way: 313281300 248877110 -1103058734 Could this be a bug from the parsing library, or is it caused by c#? Thank you in advance *I made this xml short for ease of read. It's the full xml for the way in the file I'm parsing from asked 26 Mar '15, 18:17 echoalphapapa |
Are you sure you are using the latest version of OSMSharp and long definitions throughout? It looks like it is having problems relayed to http://wiki.openstreetmap.org/wiki/64-bit_Identifiers answered 26 Mar '15, 20:37 EdLoach ♦ this might be it actually. The only problem is the newer versions of OSMSharp don't support parsing. I will investigate further. Thanks
(26 Mar '15, 20:52)
echoalphapapa
|
crosspost: https://stackoverflow.com/questions/29285779/long-changing-from-positive-to-negative-when-parsing