<div dir="ltr"><div><div>I can confirm also that it works when I set a target srs.<br></div>But must admit that the current behaviour was confusing. I knew how to interpret the input data - under the assumption that a geotransform is not changed when I do no transformations or interpolations:<br>If I know that my data are "points" rather than "pixels" - the first "point" is lying half a cellsize downwards and rightwards from the upper left corner that GDAL reports. That's what I always assume - not relying on other metadata items than the GeoTransform.<br><br></div><div>So I agree that it might be worth a ticket. <br><br></div><div>Cheers,<br></div><div>Simon<br><br></div><div><br></div><br><div> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 19, 2015 at 10:29 AM, Ari Jolma <span dir="ltr"><<a href="mailto:ari.jolma@gmail.com" target="_blank">ari.jolma@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 19.11.2015 11:26, Even Rouault wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
GDAL version:<br>
GDAL 1.11.2, released 2015/02/10<br>
Simon,<br>
<br>
Regarding the fact that the geotiff file looses the half-pixel shift, it seems<br>
to be due to the absence of a SRS. If I do "gdal_translate test.asc test.tif -<br>
a_srs EPSG:32630" for example, then the geotransform I get back is correct.<br>
This is a defect of the GeoTIFF writer that writes the GeoTIFF Tiepoints with<br>
the PixelIsPoint convention (since your original data is flagged as such), but<br>
fails to write GTRasterTypeGeoKey=RasterPixelIsPoint as a geotiff key when<br>
there's no SRS. Could be worth a ticket.<br>
</blockquote>
<br></span>
My conclusion is the same. I think the key should be set regardless of the existence of a SRS.<span class="HOEnZb"><font color="#888888"><br>
<br>
Ari</font></span><span class="im HOEnZb"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Some background: <a href="https://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint" rel="noreferrer" target="_blank">https://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint</a><br>
<br>
A workaround :<br>
gdal_translate test.asc test.tif -mo AREA_OR_POINT=AREA<br>
<br>
This will force the geotiff writer to use the default convention, and thus<br>
avoiding going back to the centerofpixel convention when writing the GeoTIFF<br>
tiepoints.<br>
<br>
Even<br>
<br>
</blockquote>
<br></span><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div></div></blockquote></div><br></div>