Hi there,<br><br>I want to select only a region of a raster file; that is, suppose I know the coordinates that form a bounding box around a region, I want to select just that region and write it to another file.<br><br>I'm rather new to GDAL and thus far I'm only aware of one way to do this; since I'm using Python:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><pre class="fragment"><font size="4">scanline = band.ReadRaster( 0, 0, band.XSize, 1, band.XSize, 1, <a class="code" href="http://www.gdal.org/gdal_8h.html#22e22ce0a55036a96f652765793fb7a4f5cbd2f96abffd9ac061fc0dced5cbba">GDT_Float32</a> )</font><br>
</pre></blockquote>I believe that I can specify the window of raster data to read using the 3rd till 6th input parameters of the above method (with reasonable size reads untill the entire regions I'm interested in is read).<br>
<br>Is there some other way this was suppose to be done? The method above will require me to convert my coordinates into rows and columns (I think) which is fine... but leaves room for error so I'd like to only rely on GDAL routines. Can someone please advise? It could very well be that I'm totally mistaken... I hope this isn't such a bad question...<br>
<br clear="all">Kind regards<br>Pooven<br><br><br>