Opened 7 years ago

Closed 7 years ago

#6763 closed defect (duplicate)

GDAL GTiffDataset not always storing GTRasterTypeGeoKey

Reported by: mduzee Owned by: warmerdam
Priority: low Milestone:
Component: default Version: 1.11.1
Severity: minor Keywords:
Cc:

Description

The GTiffDataset::WriteGeoTIFFInfo() method will store the data extents as 'Pixel is Point' if the 'Pixel is Point' metadata is set on the raster. It also stores the 'Pixel is Point' metadata in the Tiff's header so that the extents can be adjusted again when the data is opened. This works fine unless the projection is not set. The 'Pixel is Point' metadata (GTRasterTypeGeoKey) is only stored in the Tiff's header if the projection is set.

If a 'Pixel is Point' GeoTiff is created with no projection (probably doesn't happen very often), when that GeoTiff is opened again the data extents will be wrong.

Simply moving the code that stores the 'Pixel is Point' metadata up a few lines fixes this.

Attachments (1)

geotiff.cpp.patch (918 bytes ) - added by mduzee 7 years ago.

Download all attachments as: .zip

Change History (2)

by mduzee, 7 years ago

Attachment: geotiff.cpp.patch added

comment:1 by Even Rouault, 7 years ago

Resolution: duplicate
Status: newclosed

As far as I can see, this has been fixed in GDAL 2.0.2 and later. See #6225.

We don't maintain 1.11 any more. Time for you to update to latest and greatest (2.1.2)

Note: See TracTickets for help on using tickets.