Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4607 closed defect (fixed)

EPSG authority code is not preserved

Reported by: ilucena Owned by: warmerdam
Priority: normal Milestone: 1.9.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: EPSG code GTiff
Cc: ilucena, rprinceley, gaopeng, esrixz

Description

The file has PCS code compatible with EPSG but the driver doesn't show it as it was discussed in this thread:

http://lists.osgeo.org/pipermail/gdal-dev/2012-April/032373.html

I am going to give a copy of that file to Frank so he can take a look.

Attachments (1)

bug4607.tif (387 bytes ) - added by warmerdam 12 years ago.
Small Geotiff file demonstrating the problem.

Download all attachments as: .zip

Change History (10)

comment:1 by warmerdam, 12 years ago

Component: defaultGDAL_Raster
Keywords: GTiff added
Milestone: 2.0.0
Status: newassigned

For reference the file in question has this listgeo report:

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0                
         1828467.9197375  646446.2788915   0                
      ModelPixelScaleTag (1,3):
         0.3048009999999990.3048009999999990                
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,26): "NAD83 / California zone 3"
      GeogCitationGeoKey (Ascii,6): "NAD83"
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_California_3
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
      End_Of_Keys.
   End_Of_Geotiff.

and this gdalinfo SRS:

PROJCS["NAD_1983_StatePlane_California_III_FIPS_0403",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS_1980",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.0174532925199432955]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["False_Easting",2000000],
    PARAMETER["False_Northing",500000],
    PARAMETER["Central_Meridian",-120.5],
    PARAMETER["Standard_Parallel_1",37.06666666666667],
    PARAMETER["Standard_Parallel_2",38.43333333333333],
    PARAMETER["Latitude_Of_Origin",36.5],
    UNIT["Meter",1]]

It is not clear why the authority node is not present.

by warmerdam, 12 years ago

Attachment: bug4607.tif added

Small Geotiff file demonstrating the problem.

comment:2 by warmerdam, 12 years ago

Cc: rprinceley gaopeng added
Milestone: 1.9.1

+rprinceley, +gaopeng

The problem is that the CheckCitationKeyForStatePlaneUTM() method is setting the SRS based on a matching state plane PCS name and circumventing the normal setting based on EPSG logic.

At the very least we need to add the EPSG authority codes when appropriate.

But I don't really understand why we are going through this code path when we have perfectly good EPSG WKT we can use. Is the goal of this function to establish an SRS based on a name matching a PE string when we don't otherwise have a full definition? Or is it intended to ensure we use PE names for the projected SRS so PE recognising the SRS? It seems like the function is doing a lot of things and some of the cases might not make sense to apply outside of ESRI but I'm not sure which.

Robin / Gao - could someone from ESRI comment on what you guys need in this situation?

comment:3 by rprinceley, 12 years ago

Cc: esrixz added

I believe this mostly for dealing with legacy Esri/ERDAS style citation strings. We should be able to handle EPSG WKT if present and fallback to PE - I'm not sure if there is a need to provide exact citation names to PE (we aren't doing so for other cases).

Xiuguang should be able to provide concrete details.

comment:4 by ilucena, 12 years ago

Is that any update on that issue folks?

comment:5 by ilucena, 12 years ago

I mean "Is *there* ..." Thanks.

comment:6 by ilucena, 12 years ago

I would like to point out that if we add the EPGS code 26943 to the regression test script http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_srs.py#L88 that will fail.

That means that this problem is independent from data sample.

Note that by removing all the esri_* files from the GDAL_DATA folder the problem disappears.

Gao, would that be the case that those esri_* files are only useful on ESRI software? If that is true we could change GDAL's "make install" to avoid copying those files to the data folder and add an "make install-esri" that does. Does it looks like a solution?

Frank, may I go ahead and add the code 26943 to the regression test? That would help us to trac that issue in the future.

Regards,

Ivan

comment:7 by warmerdam, 12 years ago

Ivan, please do. I'm also hoping to work on this bug this afternoon.

comment:8 by warmerdam, 12 years ago

Resolution: fixed
Status: assignedclosed

For non ESRI_BUILDs I have modified the CheckCitationKeyForStatePlaneUTM() to do nothing if the PCS is already available, so that things will fall through to the normal EPSG handling.

The change is in trunk (r24344) and 1.9 branch (r24345).

comment:9 by ilucena, 12 years ago

Frank, it seems to be working fine now. Thanks.

Note: See TracTickets for help on using tickets.