Skip to content

MiTAB precision #2

@vpicavet

Description

@vpicavet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions