Opened 11 years ago

Last modified 9 years ago

#4931 closed defect

MapInfo assigned wrong projection — at Version 1

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

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 epsg25832_sample.tab

gives this result:

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

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",

GEOGCS["unnamed",

DATUM["Euref_98",

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.

Change History (2)

by bvthomsen, 11 years ago

Attachment: epsg25832_sample (1).zip added

example epsg:25832 tab file with 1 polygon

comment:1 by bvthomsen, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.