<div dir="ltr"><div class="gmail_extra"><div style="font-family:tahoma,sans-serif" class="gmail_default">​Hi there,<br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">just coming back to confirm that the method is successful.<br><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">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.<br><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">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.<br><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Thanks for helping me out !<br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">-Piero<br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br> [1] <a href="http://www.gdal.org/gdal_tutorial.html">http://www.gdal.org/gdal_tutorial.html</a>​</div><br><div class="gmail_quote">On 16 November 2016 at 11:05, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-:vz" class="gmail-a3s gmail-aXjCH gmail-m1586c991a60af7d0">1) # Create a black image of the right size and SRS<br>
gdal_translate random.tif temp.vrt -of VRT -outsize ... -a_srs ... -scale 0 1 0 0<br>
2) Edit the <GeoTransform> node in my.vrt<br>
3) gdal_translate my.vrt out.tif<br>
4) <span class="gmail-il">gdalwarp</span> src.tif out.tif<br>
</div></blockquote></div><br><br></div></div>