Opened 21 years ago
Last modified 21 years ago
#337 closed defect (fixed)
Gtiff format driver projection saving bug
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
In the file gdal-1.1.8/frmts/gtiff/geotiff.cpp, lines 1536-1538 in the function WriteGeoTIFFInfo, the lines: if( adfGeoTransform[0] != 0.0 && adfGeoTransform[1] != 1.0 && adfGeoTransform[2] != 0.0 && adfGeoTransform[3] != 0.0 && adfGeoTransform[4] != 0.0 && ABS(adfGeoTransform[5]) != 1.0 ) should be: if( adfGeoTransform[0] != 0.0 || adfGeoTransform[1] != 1.0 || adfGeoTransform[2] != 0.0 || adfGeoTransform[3] != 0.0 || adfGeoTransform[4] != 0.0 || ABS(adfGeoTransform[5]) != 1.0 ) The effect of this bug is that the geotransform and projection are not saved unless all six geotransform numbers are different from the default. It could very well be the case that this function has other logic problems too, but the change above fixed the problem I was having.
Note:
See TracTickets
for help on using tickets.