Opened 11 years ago

Closed 11 years ago

Last modified 11 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


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

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 11 years ago.
Small Geotiff file demonstrating the problem.

Download all attachments as: .zip

Change History (10)

comment:1 by warmerdam, 11 years ago

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

For reference the file in question has this listgeo report:

   Version: 1
   Key_Revision: 1.0
      ModelTiepointTag (2,3):
         0                0                0                
         1828467.9197375  646446.2788915   0                
      ModelPixelScaleTag (1,3):
      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

and this gdalinfo SRS:


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

by warmerdam, 11 years ago

Attachment: bug4607.tif added

Small Geotiff file demonstrating the problem.

comment:2 by warmerdam, 11 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, 11 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, 11 years ago

Is that any update on that issue folks?

comment:5 by ilucena, 11 years ago

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

comment:6 by ilucena, 11 years ago

I would like to point out that if we add the EPGS code 26943 to the regression test script 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.



comment:7 by warmerdam, 11 years ago

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

comment:8 by warmerdam, 11 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, 11 years ago

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

Note: See TracTickets for help on using tickets.