Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1416 closed defect (fixed)

Problem with MapInfo file and NTF system

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 Mateusz Łoskot)

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 (4)

comment:3 Changed 10 years ago by warmerdam

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

comment:4 Changed 10 years ago by warmerdam

I concur with the patch, and have tested in trunk.

I will need to pursue upstreaming it into mitab, and applying it to 1.4 branch in the morning.

comment:5 Changed 10 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

Patch applied in trunk, branches/1.4 and upstreamed in mitab cvs repository. Added test into ogr/ogr_mitab.py script (test 10).

comment:6 Changed 10 years ago by Mateusz Łoskot

Description: modified (diff)

Frank applied the patch to trunk (r11684) and branches/1.4 (r11682)

Note: See TracTickets for help on using tickets.