Hi there, just coming back to confirm that the method is successful. As described in GDAL API tutorial [1], the GeoTransform matrix elements put X/Y offsets first in the correspondent raws (quite unusual for my own experience), so by setting the geo-transform matrix as M_g = [ OffX ScaleX ShearX OffY ShearY ScaleY ] you can get your correct gdalwarped output.
Note that -- having at hand an affine transformation based on geo-units to apply to an image, I had to *pre-concatenate* it to the pixel-2-world transform (that is in the GeoTransform node) to make the math work. Thanks for helping me out ! -Piero [1] http://www.gdal.org/gdal_tutorial.html On 16 November 2016 at 11:05, Even Rouault <[email protected]> wrote: > 1) # Create a black image of the right size and SRS > gdal_translate random.tif temp.vrt -of VRT -outsize ... -a_srs ... -scale > 0 1 0 0 > 2) Edit the <GeoTransform> node in my.vrt > 3) gdal_translate my.vrt out.tif > 4) gdalwarp src.tif out.tif >
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
