Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiTAB precision #2

Open
vpicavet opened this issue May 13, 2013 · 1 comment
Open

MiTAB precision #2

vpicavet opened this issue May 13, 2013 · 1 comment

Comments

@vpicavet
Copy link

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

@mikec-bmg
Copy link

I'm seeing the same precision loss issue when loading and re-saving a TAB file with lat/lon coordinates using MITAB. Any news on getting this patch applied?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants