On 19.11.2015 11:26, Even Rouault wrote:
GDAL version: GDAL 1.11.2, released 2015/02/10 Simon, Regarding the fact that the geotiff file looses the half-pixel shift, it seems to be due to the absence of a SRS. If I do "gdal_translate test.asc test.tif - a_srs EPSG:32630" for example, then the geotransform I get back is correct. This is a defect of the GeoTIFF writer that writes the GeoTIFF Tiepoints with the PixelIsPoint convention (since your original data is flagged as such), but fails to write GTRasterTypeGeoKey=RasterPixelIsPoint as a geotiff key when there's no SRS. Could be worth a ticket.
My conclusion is the same. I think the key should be set regardless of the existence of a SRS.
Ari
Some background: https://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint A workaround : gdal_translate test.asc test.tif -mo AREA_OR_POINT=AREA This will force the geotiff writer to use the default convention, and thus avoiding going back to the centerofpixel convention when writing the GeoTIFF tiepoints. Even
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev