<div dir="ltr">Hi all, I need some clarifications on how raster clipper algorithm  works with not georeferenced images.<div><br></div><div>My tiff data present negative y coordinates, so when I select my area of interest in the viewer, the x-y upper left / lower right points are, for instance:</div>
<div> </div><div>ulx: 2818.33065257   uly: -5304.31204044</div><div>lrx:  3223.66153493   lry:-5825.45174632</div><div><br></div><div>Original image is 10000 x 6191 pixel</div><div><br></div><div><div>the Clipper plugin does not understand that data are not georeferenced, so running command:<br>
</div></div><div><br></div><div>gdal_translate -projwin 2818.33065257 -5304.31204044 3223.66153493 -5825.45174632 C:\Dati_Utente\f.mure\work\UTILITY\DATA\Pleiades_Primary_Product_Bundle\Pleiades_Primary_Product_Bundle.tiff<br>
</div><div><br></div><div>you got an error (Computed -srcwin falls outside raster size of 10000x6191. ).</div><div><br></div><div>if you run gdal_traslate with -srcwin option you have to change input parameters to express xoffset, yoffsset, xsize, ysize, instead of ulx uly lrx lry.</div>
<div><br></div><div>In my example, </div><div><br></div><div>xoff = 2818</div><div>yoff = 6191 - 5304</div><div>xsize = 500<br></div><div>ysize = 500</div><div><br></div><div>And finally, gdal_translate -srcjwin 2818 794 500 500 C:\Dati_Utente\f.mure\work\UTILITY\DATA\Pleiades_Primary_Product_Bundle\Pleiades_Primary_Product_Bundle.tiff<br>
</div><div><br></div><div>works fine.</div><div><br></div><div>Now my doubts/questions are:</div><div>- is there a way to switch automatically between  [-projwin ulx uly lrx lry] to  [-srcwin xoff yoff xsize ysize]  gdal_translate options, depending on data projections (georefenced or not).</div>
<div><br></div><div>- is it possible to get extracted sub-image overlapped with the selected area on the original image? </div><div><br></div><div>Could anyone give me some help?</div><div><br></div><div>Thanks in advance, </div>
<div>Fabrizio</div><div><br></div><div><br></div></div>