[gdal-dev] crop a non-square subwindow?

Wendell Turner wendell at enflight.com
Wed Mar 9 11:51:49 EST 2011


Do any of the gdal utilities crop an image on non-square
boundaries?

I use gdal_translate with -projwin ulx uly lrx lry to crop
an image that is square (left and right edges are vertical,
and the top and bottom edges are horizontal).  Is there a
command that will crop other shapes, for instance a diamond
shape, where the edges are not horizontal/vertical?

If it must be done by programming (pref. Python), is there a
sample that I could use to start with?

Thanks,

Wendell



More information about the gdal-dev mailing list