Opened 17 years ago

Last modified 17 years ago

#1416 closed defect

Problem with MapInfo file and NTF system — at Version 3

Reported by: jean-claude.repetto@… Owned by: warmerdam
Priority: highest Milestone: 1.4.2
Component: OGR_SRS Version: 1.4.0
Severity: major Keywords:
Cc:

Description (last modified by warmerdam)

I have downloaded a vectorial map of France in MapInfo format (freely available from the IGN website, see URL).

I am trying to convert it to WGS84 with ogr2ogr, but the result is wrong, the longitudes have an offset of 2.33° (corresponding to the Paris prime meridian).

The original file contains this definition of CS and projection :

CoordSys Earth Projection 3, 1002, "m", 0, 46.8, 45.898918964419, 47.696014502038, 600000, 2200000 Bounds (-113967455.417, -
106367759.649) (115167455.417, 122767151.185)

Projection type 3 = Lambert Conformal Conic
Datum 1002 = datum name: Nouvelle Triangulation Francaise (NTF) Paris Prime Meridian
            Area: France
            Ellipsoid: Modified Clarke 1880

But ogrinfo gives that information :

Layer SRS WKT:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["NTF_Paris_Meridian",
            SPHEROID["Clarke 1880 (modified for IGN)",6378249.2,293.4660213],
            TOWGS84[-168,-60,320,-0,-0,-0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",45.898918964419],
    PARAMETER["standard_parallel_2",47.696014502038],
    PARAMETER["latitude_of_origin",46.8],
    PARAMETER["central_meridian",0],
    PARAMETER["false_easting",600000],
    PARAMETER["false_northing",2200000],
    UNIT["Meter",1]]

I think the central_meridian be equal to 2.33°.
(I am using GDAL 1.4.0beta2 and proj 4.5.0).

Change History (1)

comment:3 by warmerdam, 17 years ago

Description: modified (diff)
Milestone: 1.4.2
Status: newassigned

Hello Frank,

I propose this patch to solve bug #1416 :

--- gdal-1.4.0.orig/ogr/ogrsf_frmts/mitab/mitab_coordsys.cpp
2006-03-10 20:55:00.000000000 +0100
+++ gdal-1.4.0/ogr/ogrsf_frmts/mitab/mitab_coordsys.cpp 2007-01-03
14:07:24.000000000 +0100
@@ -786,7 +786,7 @@
 /* -------------------------------------------------------------------- */
 /*      Set prime meridian for 9999 datums.                             */
 /* -------------------------------------------------------------------- */
-    if( nDatum == 9999 )
+    if( nDatum == 9999 || adfDatumParm[7] != 0.0 )
     {
         pszPrimeM = "non-Greenwich";
         dfPMLongToGreenwich = adfDatumParm[7];

Best regards, Jean-Claude

Note: See TracTickets for help on using tickets.