[gdal-dev] Subsetting based on geo-coordinates.

Frank Warmerdam warmerdam at pobox.com
Wed Jul 29 20:38:09 EDT 2009


Belaid MOA wrote:
> Hi Everyone,
>  Sorry to bother again! I am looking for a cheap/dirty way of subsetting 
> a GTiff image based on a rectangle specified in the geo-coordinates. 
> Does GDAL has already something for that?  

Belaid,

You want the -projwin switch for gdal_translate.  It will take the window
in georeferenced coordinates into an internal window in pixel coordinates and
create a subset of the file for that region.

Details at:

   http://www.gdal.org/gdal_translate.html

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list