Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5926 closed defect (fixed)

GeoTIFF reading: use importfromEPSG() with ProjectedCSTypeGeoKey value

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: OGR_SRS Version: unspecified
Severity: normal Keywords: gtiff
Cc:

Description

Currently, we can write in GeoTIFF projected coordinate system with projection methods not supported by GeoTIFF, such as Krovak.

For example, gdal_translate -a_srs EPSG:2065 will generate the following geokeys :

      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,24): "S-JTSK (Ferro) / Krovak"
      GeogCitationGeoKey (Ascii,15): "S-JTSK (Ferro)"
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      GeogTOWGS84GeoKey (Double,3): 589              76               480              
      ProjectedCSTypeGeoKey (Short,1): Unknown-2065
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter

On reading, libgeotiff GTIFGetDefn() fails to read it properly, since there's no projection method in GeoTIFF for Krovak.

Change History (3)

comment:1 by Even Rouault, 9 years ago

Component: defaultOGR_SRS
Keywords: gtiff added
Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r28920 "GTiff: use importFromEPSG() when ProjectedCSTypeGeoKey is available (#5926)"

comment:2 by Even Rouault, 9 years ago

trunk r28924 "GTiff: avoid resetting error state when calling importFromEPSG() and adapt expected test results (#5926)"

comment:3 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.