Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Simon Lyngby Kokkendorff
Done: https://trac.osgeo.org/gdal/ticket/6225#ticket Thanks once again!! Simon On Thu, Nov 19, 2015 at 10:59 AM, Even Rouault wrote: > Le jeudi 19 novembre 2015 10:47:50, Simon Lyngby Kokkendorff a écrit : > > I can confirm also that it works when I set a target srs. > > But must admit that th

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Even Rouault
Le jeudi 19 novembre 2015 10:47:50, Simon Lyngby Kokkendorff a écrit : > I can confirm also that it works when I set a target srs. > 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 d

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Simon Lyngby Kokkendorff
I can confirm also that it works when I set a target srs. 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: If I know that my data are "points" rat

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Ari Jolma
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

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Even Rouault
Le jeudi 19 novembre 2015 09:24:46, Simon Lyngby Kokkendorff a écrit : > Basically it seems to be an issue with interpreting "center" directives > when doing the gdal_translate. Consider: > > ncols 2 > nrows 2 > xllcenter 0.0 > yllcenter 0.0 > cellsize 1.0 > nodata_value -999 > 2 2 > 2 2 > > gdal

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Simon Lyngby Kokkendorff
Thanks Ari, I wasn't aware of that. Naively assumed that GDAL would just keep the geotransform in a gdal_translate, no matter what. Good to know, thanks! Cheers, SImon On Thu, Nov 19, 2015 at 10:03 AM, Ari Jolma wrote: > Simon, > > If you set the configuration option GTIFF_POINT_GEO_IGNORE

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Ari Jolma
Simon, If you set the configuration option GTIFF_POINT_GEO_IGNORE to "TRUE" instead of the default "FALSE" the offset will not happen. I've tested this and it works. The configuration option needs to be set in code, it is not a GTiff creation option. I'm not quite sure why you need to do th

Re: [gdal-dev] GeoTransform confusion

2015-11-19 Thread Simon Lyngby Kokkendorff
Basically it seems to be an issue with interpreting "center" directives when doing the gdal_translate. Consider: ncols 2 nrows 2 xllcenter 0.0 yllcenter 0.0 cellsize 1.0 nodata_value -999 2 2 2 2 gdalinfo on this file, will give the expected GeoTransform: In [2]: ds = gdal.Open("center.asc") In

[gdal-dev] GeoTransform confusion

2015-11-18 Thread Simon Lyngby Kokkendorff
Hi List, I have a geoid in AAIGRID-format, with the following header: ncols 1001 nrows 731 xllcenter 40.0 yllcenter 6045000.0 cellsize 500.0 NODATA_value GDAL will read this just fine, and report: Driver: AAIGrid/Arc/Info ASCII Grid Files: dkgeoid13b.utm32 Size is 1001, 731 Coordinat