Clipping rasters with gdal
New in gdal 1.6 is the ability to clip out bits from a raster using an OGR datasource such as a shpfile or GML doc.Here I am createing a compressed and tiled image. Make sure that the CRS are the same for both the input and clip datasets.
gdalwarp -co COMPRESS=DEFLATE -co TILED=YES -of GTiff \
-r lanczos -cutline SAProvincesNew4kmBuffer2.shp \
Spot5_RSA_2008_10m/Spot5_RSA_2008_10m.vrt \
/opt/Spot5_RSA_2008_10m_clip.tif
Creating output file that is 184348P x 140972L.
Processing input file Spot5_RSA_2008_10m/Spot5_RSA_2008_10m.vrt.
0...
Posted on Friday January 9th