-
Notifications
You must be signed in to change notification settings - Fork 22
Description
When reading a MAPINFO TAB file and rewriting it, for example with ogr2ogr, we can observe some precision loss in the float encoding.
We should add a data precision information, which is what the proposed patch does.
The precision is computed given the data bound.
Mapinfo scales the data values of the geographical bound on the following range :
[-1 000 000 000; 1 000 000 000]
The maximal precision we can get for geographical coordinates equals the difference between two consecutive integers, converted to geographical coordinates. That is to say :
This gives precision = bound range / 2 000 000 000
Mapinfo uses this precision to truncate values when converted from integer to geographical coordinates.
The patch :
https://gist.github.com/vpicavet/5569961