Opened 10 years ago

Closed 7 years ago

#4931 closed defect (fixed)

MapInfo assigned wrong projection

Reported by: bvthomsen Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: mitab towgs84

Description (last modified by bvthomsen)

When reading MapInfo tab files (at least my tabfile ;-), the file gets assigned a wrong projection when read by OGR:

My sample tab contains 1 polygon and have the projection epsg:25832 (UTM 32/ETRS89). It is created by MapInfo 10.5.

The command: ogrinfo -so -al

gives this result:

Had to open data source read-only. INFO: Open of `'

using driver `MapInfo File' successful.

Layer name: epsg25832_sample Geometry: Unknown (any) Feature Count: 1 Extent: (709652.834000, 6216521.309500) - (709888.947500, 6216762.795500) Layer SRS WKT: PROJCS["unnamed",



SPHEROID["GRS 80",6378137,298.257222101], TOWGS84[0,0,0,-0,-0,-0,0]],

PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]],

PROJECTIONTransverse_Mercator, PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1.0]]

DISTNR: Real (4.0) DISTNAVN: String (40.0) SKOVNR: Real (5.0) SKOVNAVN: String (80.0) AFDELING: Real (5.0) LITRA: String (2.0) LITRAAREAL: Real (15.2) ANV_KODE: String (5.0) ANL_AAR: String (5.0) ANV_BESK: String (40.0) OPDATERET: String (20.0) BRUGER: String (10.0) EXPORTDATO: String (10.0)

The line: TOWGS84[0,0,0,-0,-0,-0,0]],

contains "minus zero" ?

When you use the OGR library downstream, ex. in QGIS, the wrong projection results in a "on-the-fly" reprojection even if the QGIS project has the same projection as the tab file is supposed to have. This almost doubles the drawing time in QGIS and supposedly other programs that use OGR.

This bug correspond to the - now closed - issue #5820 in the QGIS bug-tracker.

The bug is present in at least versions svn-trunk and 1.9.2

Attachments (1)

epsg25832_sample (1).zip (2.1 KB ) - added by bvthomsen 10 years ago.
example epsg:25832 tab file with 1 polygon

Download all attachments as: .zip

Change History (8)

by bvthomsen, 10 years ago

Attachment: epsg25832_sample (1).zip added

example epsg:25832 tab file with 1 polygon

comment:1 by bvthomsen, 10 years ago

Description: modified (diff)

comment:2 by bvthomsen, 10 years ago

Description: modified (diff)
Version: unspecifiedsvn-trunk

comment:3 by Even Rouault, 10 years ago

Component: defaultOGR_SF
Keywords: mitab towgs84 added
Milestone: 1.10.0

Fixed in trunk in r25343.

Filed in upstream MITAB as

comment:5 by Jukka Rahkonen, 8 years ago

Still not merged to mitab code in github. Have to keep this ticket open.

comment:6 by Jukka Rahkonen, 8 years ago

I thought that I would close this ticket because GDAL is now fixed but mitab issues are really not followed here So, keeping the resolved ticket still open even I am not at all sure if it makes sense.

comment:7 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

Batch closing of MITAB tickets fixed in GDAL. They were kept open because not merged into MITAB separate repository, but the latter one is inactive, so let's close them definitely.

Note: See TracTickets for help on using tickets.