[gdal-dev] MapInfo Geometry Precision Issues

Luca Sigfrido Percich sigfrido at tiscali.it
Mon May 28 02:03:48 PDT 2012


Hi all,

MapInfo stores coordinates in 32 bit integers (binary tab format), and
converts them back into floating point when loading data. The conversion
is done taking the boundary into account. The greater the boundary, the
lower the precision. That's  why lat/lon coordinates are stored with
greater precision than projected coordinates.
In MapInfo, a boundary is always associated with the projection info,
but I can use the same CRS with different boundaries. The correct
boundary should be defined prior to storing coordinates in the file.

It seems that currently OGR/mitab does not support setting the boundary.
One workaround to increase precision in MapInfo is to save data in
MIF/MID format, manually edit the MIF file where an explicit Boundary
clause can be found at the very top. Narrowing down the boundary width
from the default (OGR) 30000000 to 300000 will increase precision by two
decimal places.

There is a MITABLoadCoordSysTable mitab/mitab_vbounds.cpp which seems to
allow to averride the default bounds associated with a projection with
those read from the given text file, but it is not called from within
OGR. Maybe it is available from the Java bindings.

Sig

Il giorno sab, 26/05/2012 alle 17.34 +0530, Chaitanya kumar CH ha
scritto:
> Murali,
> 
> The mapinfo driver is not known for creating datasets with good
> precision. Projected coordinates can have an error of up to 0.02
> 
> http://www.gdal.org/ogr/drv_mitab.html
> http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_mitab.py#L106
> 
> On Sat, May 26, 2012 at 9:24 AM, Murali Krishna
> <muralikrishna50 at gmail.com> wrote:
>         I'm trying to create a MapInfo file using gdal ogr java
>         bindings (version 1.9.0) with some point geometries.
>         However the geometries in the created MapInfo file doesn't
>         actually match with the values which i have used in creation.
>         
>         For example, I create a MapInfo feature with a point geometry
>         and with the following coordinates:
>         X = 196153.123 
>         Y= 272453.6789
>         
>         When i read the same feature back, GDAL gives the following as
>         coordinates for the same feature:
>         X = 196153.12630125193 
>         Y = 272453.67830354505
>         
>         Any reason why MapInfo driver changes these coordinates?
>         
>         Thanks in advance
>         
>         _______________________________________________
>         gdal-dev mailing list
>         gdal-dev at lists.osgeo.org
>         http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> 
> -- 
> Best regards,
> Chaitanya kumar CH.
> 
> +91-9494447584
> 17.2416N 80.1426E
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


_____________
PRIVACY
Le informazioni contenute in questo messaggio sono riservate e confidenziali. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo dal Suo Sistema e a distruggere le varie copie o stampe, dandone gentilmente comunicazione all’indirizzo mail del mittente. Ogni utilizzo improprio e' contrario ai principi del D.lgs 196/03 e alla legislazione europea (Direttiva 2002/58/CE).

PRIVACY
Le informazioni contenute in questo messaggio sono riservate e confidenziali. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo dal Suo Sistema e a distruggere le varie copie o stampe, dandone gentilmente comunicazione all’indirizzo mail del mittente. Ogni utilizzo improprio e' contrario ai principi del D.lgs 196/03 e alla legislazione europea (Direttiva 2002/58/CE).


More information about the gdal-dev mailing list