openstreetmapdata-conversionosmosis

How to prevent osmconvert from cutting last 2 digits in lat/lon


When I osmconvert a high precision indoor map like this:

osmconvert64.exe --fake-author --statistics testmap.osm -o=testmap_new.osm -v=2

the last 2 digits of every lat/lon coordinate are getting cut.

E.g.

 <node id='-294242' action='modify' visible='true' lat='52.526315601' lon='13.31412083867'>
       <tag k='ref' v='491058911' />
 </node>

becomes:

    <node id="-294242" lat="52.5263156" lon="13.3141208" version="1" timestamp="1970-01-01T00:00:01Z" changeset="1">
          <tag k="ref" v="491058911"/>
    </node>

How can I prevent osmconvert from cutting the last 2 digits?


Solution

  • Unfortunately you cannot. The program osmconvert does not support higher resolutions than 100 nanodegrees, which is equivalent to approximately 1 cm and sufficient for most mapping purposes.

    I've chosen to implement this limitation as it allows significant higher processing speed: geocoordinates can be easily stored and calculated using 32-bit variables.

    For this reason you will find the same limitation in a lot of other OSM-related programs as well.