<html><div style='background-color:'><DIV class=RTE>Hello,</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> I am trying to find a way to take an input GeoTIFF and save its sub-image into the output file. I have tried to do this several ways but it seems that I will have to apply RasterIO which I do not understand enough to use it. I have been able to chop the image by reducing the number of pixels and lines but then the left top corner remains 0, 0 all the time.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>hDstDS = GDALCreate(hDriver, fileNameOut, <STRONG>nPixels</STRONG>, <STRONG>nLines</STRONG>, GDALGetRasterCount(hSrcDS), eDT, apszOptions);</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Then I tried using the following and just modify the parameters but when I change 0, 0 to something the image is not produced at all, while changing the bottom right corder parameters takes an image from the input and then warps it which also produces undesired product:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>oOperation.ChunkAndWarpImage(0, 0, GDALGetRasterXSize(hDstDS), GDALGetRasterYSize(hDstDS));</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>My ultimate goal is to merge four images, project them (know how to do), cut an arbitrary rectangular part out of the projected image. The cutting rectangle boundaries for image cut would be supplied in utm coordinates.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> Thank you very much ahead.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> Ilya S.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> </DIV></div></html>