Opened 9 years ago

Closed 10 months ago

Last modified 10 months ago

#3292 closed defect (fixed)

[PATCH] MITAB: some French EPSG code doesn't seems to be supported

Reported by: yjacolin Owned by: Daniel Morissette
Priority: normal Milestone: 2.3.0
Component: OGR_SRS Version: unspecified
Severity: normal Keywords: srs, projection
Cc: yjacolin@…, mathieu.rajerison@…, Even Rouault, warmerdam

Description

Here is an issue showed by a french user on GeoRezo? Portail (http://georezo.net/forum/viewtopic.php?pid=155606)

Hello,

When transforming a MapInfo? File from one coordinate Reference System to the following EPSG codes EPSG:27584, 27574, 27572, the result is a reprojected file with a false header. The header contains "nonearth" information. When transforming into RGF93 (EPSG:2154), the result is a header that contains WGS84 srs projection information.

The issue is about the header writing for these coordinate reference systems. These are the only ones that I've tested until now.

Best,

Mathieu

Attachments (2)

Matable.zip (8.4 KB) - added by yjacolin 7 years ago.
Sample data in MapInfo? format
ticket_3292_datum_issue_part.patch (1.6 KB) - added by Even Rouault 7 years ago.
Patch to map Reseau_Geodesique_Francais_1993 to GRS_80, and avoid 0 to be turned into -0 in TOWGS84

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by Even Rouault

Cc: Even Rouault added
Owner: changed from warmerdam to Daniel Morissette
Summary: Some French EPSG code doesn't seems to be supportedMITAB: some French EPSG code doesn't seems to be supported

Daniel,

A quick analysis shows that all those EPSG codes are based on the "Lambert_Conformal_Conic_1SP" projection method, whereas the MITAB code only seems to handle LCC_2SP

For EPSG:2154, the expansion of the code gives "Reseau_Geodesique_Francais_1993" for the datum name. This datum is not listed in the asDatumInfoList[] array, so it defaults to using WGS84.

Changed 7 years ago by yjacolin

Attachment: Matable.zip added

Sample data in MapInfo? format

comment:2 Changed 7 years ago by yjacolin

Hello,

I attach a zip file contening two mapinfo file, maTable.* is a sample dataset in Lambert 93 srs from Mapinfo and MATAble_EPSG2154 made by QGIS after opening the first dataset and save it to MapInfo? file.

Hope it helps,

Y.

comment:3 Changed 7 years ago by Daniel Morissette

Cc: warmerdam added

The 'tabdump' program returns the following info from the header of the MaTable?.MAP file in the attached ZIP:

  m_sProj.nDatumId      = 33
  m_sProj.nProjId       = 3
  m_sProj.nEllipsoidId  = 0
  m_sProj.nUnitsId      = 7
  m_sProj.adProjParams  = 3 46.5 44 49 700000 6.6e+06
  m_sProj.dDatumShiftX  = 0
  m_sProj.dDatumShiftY  = 0
  m_sProj.dDatumShiftZ  = 0
  m_sProj.adDatumParams = 0 0 0 0 0

ProjId? == 3 is already handled as LCC on read by calling OGRSpatialReference::SetLCC() in mitab_spatialref.cpp's TABFile::GetSpatialRef?(). How can we tell OGR to treat the projection as LCC_1SP instead of LCC_2SP which seems to happen by default?

comment:4 Changed 7 years ago by Even Rouault

Summary: MITAB: some French EPSG code doesn't seems to be supported[PATCH] MITAB: some French EPSG code doesn't seems to be supported

I've attached a patch to address the GRS_80 vs GRS_1980 issue, map Reseau_Geodesique_Francais_1993 to GRS_80 (since apparently there's no difference in the file between the 2 datums), and avoid 0 to be turned into -0 in TOWGS84 . This doesn't solve the LCC_1SP vs LCC_2SP issue.

Changed 7 years ago by Even Rouault

Patch to map Reseau_Geodesique_Francais_1993 to GRS_80, and avoid 0 to be turned into -0 in TOWGS84

comment:5 Changed 7 years ago by Even Rouault

I've removed the GRS_1980 alias. I must have messed up something in my test. It is likely unnecessary.

comment:6 Changed 10 months ago by Even Rouault

In 40854:

Add OGRSpatialReference::convertToOtherProjection() (bound to C as OSRConvertToOtherProjection() and to SWIG) to transform between different equivalent projections (currently Merc_1SP <--> Merc_2SP and LCC_1SP <--> LCC_2SP) (refs #3292)

comment:7 Changed 10 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 40855:

MITAB: accept creating files with LCC_1SP SRS (fixes #3292)

comment:8 Changed 10 months ago by Even Rouault

Milestone: 2.3.0
Note: See TracTickets for help on using tickets.