[OSM-dev] ogr2osm coordinate precision

Sebastiaan Couwenberg sebastic at xs4all.nl
Sun Jun 29 21:24:26 UTC 2014


Currently ogr2osm outputs OSM node element using 9 decimal places for
lat/lon coordinates, shouldn't it use 7 decimal places instead to match
the documentation?

The wiki documentation lat/lon values says:

"
float
≥ −90.0 and ≤ 90.0
with 7 decimal places
"

http://wiki.openstreetmap.org/wiki/Node#Structure


ogr2osm uses the --sigificant-digits and --rounding-digits options to
set the precision, and uses the default values of 9 and 7 respectively.

https://github.com/pnorman/ogr2osm/blob/master/ogr2osm.py#L113

ogr2osm uses the --sigificant-digits value for the precision in the
output. Should it use the --rounding-digits value or even a separate
variable specifically for the output?

https://github.com/pnorman/ogr2osm/blob/master/ogr2osm.py#L557

I was tempted to submit a pull request but didn't, because I'm not sure
if it's a bug or if I'm just missing something.

Kind Regards,

Bas



More information about the dev mailing list