Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#1315 closed defect (fixed)

gdal_translate : Lambert_Conformal_Conic_1SP and Lambert_Conformal_Conic_2SP

Reported by: favard@… Owned by: Even Rouault
Priority: highest Milestone: 1.4.3
Component: GDAL_Raster Version: unspecified
Severity: blocker Keywords: geotiff srs
Cc: favard@…, warmerdam, Kyle Shannon

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.


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 ?


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

gdal-1.4.2-bug1315.patch (504 bytes) - added by Even Rouault 13 years ago.
gdal_svn_bug1315.patch (537 bytes) - added by Even Rouault 13 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by favard@…

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

comment:2 Changed 13 years ago 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 );


CT_LambertConfConic_1SP );

as you said.

comment:3 Changed 13 years ago by Even Rouault

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

Changed 13 years ago by Even Rouault

Attachment: gdal-1.4.2-bug1315.patch added

Changed 13 years ago by Even Rouault

Attachment: gdal_svn_bug1315.patch added

comment:4 Changed 13 years ago by warmerdam

Cc: warmerdam added
Component: defaultGDAL_Raster
Description: modified (diff)
Keywords: geotiff srs added
Milestone: 1.4.3
Owner: changed from warmerdam to Even Rouault


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.

comment:5 Changed 13 years ago by Even Rouault

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

comment:6 Changed 13 years ago by warmerdam

Resolution: fixed
Status: newclosed

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

comment:7 Changed 10 years ago by Kyle Shannon

Cc: Kyle Shannon added
Note: See TracTickets for help on using tickets.