On Wed, Feb 17, 2016 at 4:12 AM, Even Rouault <even.roua...@spatialys.com> wrote: > Le mercredi 17 février 2016 00:23:26, Andrew Bell a écrit : >> Hi, >> >> I'm trying to understand why GDALApplyGeoTransform behaves as it does. >> I would think that when you use it to transform a raster coordinate to >> a geo coordinate, it would apply what is known about the raster and >> the transformation to get the correct location. What I see happening >> is some drivers is an adjustment to "center" the points in the middle >> of a raster cell. This is fine, but I don't understand why >> GDALApplyGeoTransform doesn't do this if this is always the proper >> operation. > > GDALApplyGeoTransform() doesn't do this, as adjusting to pixel center or pixel > top-left corner depends on the convention of each driver (and for some drivers > like GTiff, both conventions can exist depending on datasets), so the logic is > in driver code.
But given a GDAL raster and it's associated SRS/transformation matrix, how do I know if the 1/2 pixel offset should be applied to arrive at the proper geolocation? Do rasters internally to GDAL always follow one or the other of PixelIsArea or PixelIsPoint? Thanks, -- Andrew Bell andrew.bell...@gmail.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev