Ticket #1315 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

gdal_translate : Lambert_Conformal_Conic_1SP and Lambert_Conformal_Conic_2SP

Reported by: favard@bionatics.com Assigned to: rouault
Priority: highest Milestone: 1.4.3
Component: GDAL_Raster Version: unspecified
Severity: blocker Keywords: geotiff srs
Cc: favard@bionatics.com, warmerdam

Description (Last modified by warmerdam)

I'm trying to translate a GRD file to a TIF raster, with new coordinate system.
This system is defined in a prj file.

PROJCS["NTF_France_III_degrees",GEOGCS["GCS_NTF",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199432955]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["false_easting",600000],PARAMETER["false_northing",3200000],PARAMETER["central_meridian",2.337229166666667],PARAMETER["standard_parallel_1",44.1],PARAMETER["scale_factor",0.999877499],PARAMETER["latitude_of_origin",44.1],UNIT["Meter",1]]]

System projection is Lambert_Conformal_Conic_1SP.
when I run gdal_translate the system projection of the generated file is Lambert_Conformal_Conic_2SP....Why ?

PROJCS["NTF_France_III_degrees",
    GEOGCS["GCS_NTF",
        DATUM["unknown",
            SPHEROID["unnamed",6378249.2,293.4660200000038]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",0],
    PARAMETER["standard_parallel_2",0],
    PARAMETER["latitude_of_origin",44.1],
    PARAMETER["central_meridian",2.337229166666667],
    PARAMETER["false_easting",600000],
    PARAMETER["false_northing",3200000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

The problem is that parameters for Lambert_Conformal_Conic_2SP seem to be wrong.
It seems that standard_parallel_1 and standard_parallel_2 cannot have the same value.

Is it a bug ?
How to resolve this problem ?

thank you for your answer...
I retrieve the same problem if I use gdalwarp tool.

It is

Attachments

gdal-1.4.2-bug1315.patch (504 bytes) - added by rouault on 08/13/07 06:17:45.
gdal_svn_bug1315.patch (0.5 kB) - added by rouault on 08/13/07 06:18:03.

Change History

10/06/06 12:12:09 changed by favard@bionatics.com

perhaps the bug is in the gt_wkt_srs.cpp file
in the function GTIFSetFromOGISDefn when Lambert_Conformal_Conic_1SP projection is recognized, ProjCoordTransGeoKey key is set with CT_LambertConfConic_2SP value. I think it should be set with CT_LambertConfConic_1SP value. Could you confirm me that it is the bug...
thank you

07/08/07 06:01:36 changed by martinoty

Yes, I can confirm this is a bug, and the correction is indeed quite simple: At frmts/gtiff/gt_wkt_srs.cpp#L1425 , replace:

CT_LambertConfConic_2SP );

with:

CT_LambertConfConic_1SP );

as you said.

08/13/07 06:16:57 changed by rouault

Just making the patches (against 1.4.2 and SVN trunk) to make it easy to push it into SVN.

08/13/07 06:17:45 changed by rouault

  • attachment gdal-1.4.2-bug1315.patch added.

08/13/07 06:18:03 changed by rouault

  • attachment gdal_svn_bug1315.patch added.

08/20/07 14:48:04 changed by warmerdam

  • description changed.
  • cc changed from favard@bionatics.com to favard@bionatics.com, warmerdam.
  • component changed from default to GDAL_Raster.
  • owner changed from warmerdam to rouault.
  • milestone set to 1.4.3.
  • keywords set to geotiff srs.

Folks,

I concur with the analysis. Even, could you go ahead and apply your patches to branches/1.4 and trunk? Please leave it open as I will need to migrate the change into 1.4-esri branch.

08/20/07 15:01:09 changed by rouault

Patch commited in branches/1.4 in r11916 and in trunk in r11917

08/30/07 00:09:55 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.

I'm closing since I believe 1.4-esri has already been snapped into ArcGIS and everything else is taken care of.