Opened 12 years ago

Closed 7 years ago

#2933 closed defect (fixed)

PCSCitationGeoKey is not preserved in WKT from GeoTIFF tags

Reported by: hobu Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: GTiff PCSCitationGeoKey
Cc: mrosen

Description

Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_Florida_East
      PCSCitationGeoKey (Ascii,36): "Florida State Plane East NAD83/HARN"
      ProjLinearUnitsGeoKey (Short,1): Linear_Foot_US_Survey
      VerticalUnitsGeoKey (Short,1): Unknown-9003
      End_Of_Keys.
   End_Of_Geotiff
PROJCS["NAD83 / Florida East",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",24.33333333333333],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.999941177],
    PARAMETER["false_easting",656166.6666666666],
    PARAMETER["false_northing",0],
    UNIT["US survey foot",0.3048006096012192,
        AUTHORITY["EPSG","9003"]],
    AUTHORITY["EPSG","26958"]]

This file is from libLAS' samples library, called test.las at http://liblas.org/samples You must link libLAS with GDAL and GeoTIFF to be able to replicate, but the code is the same gt_wkt_srs.cpp from the frmts/gtiff driver

It uses r16109 of gt_wkt_srs.cpp http://liblas.org/browser/trunk/src/gt_wkt_srs.cpp

Change History (3)

comment:1 Changed 12 years ago by hobu

Cc: mrosen added
Keywords: PCSCitationGeoKey added

This GeoTIFF key sets both the PCS and the PCSCitationGeoKey, and it is seriously confused. It sets the PCS to 26958, which is Florida East, but then it tries to set the PCSCitationGeoKey to something with HARN in it.

The PCS says it is: http://spatialreference.org/ref/epsg/26958/

But the PCSCitationGeoKey means: http://spatialreference.org/ref/epsg/2777/

I don't think this is a bug. This GeoTIFF is misspecified. The only bug is that the vertical units is not preserved, and the code for setting the PCSCitationGeoKey doesn't use the SetCitationToSRS code in a similar fashion to how the GTCitationGeoKey is set. I have fixed this in r16723.

comment:2 Changed 12 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: GTiff added

comment:3 Changed 7 years ago by Jukka Rahkonen

Resolution: fixed
Status: newclosed

Analyzed to be mostly invalid 6 years ago and a related fix was also done then.

Note: See TracTickets for help on using tickets.