[Gdal-dev] clipping raster using polygon?

jluis at ualg.pt jluis at ualg.pt
Thu Jun 23 17:35:38 EDT 2005


Quoting Bart van den Eijnden <BEN at Syncera-ITSolutions.NL>:

> Hi list,
>
> is it possible using GDAL to clip a raster using a polygon from eg a 
> shapefile and have all the rest turn into NODATA values? If it is 
> possible, how does it work?
>
> Thanks in advance.
>
> Best regards,
> Bart

Bart,
I don't know if there is a programaticaly way of doing it with gdal.
However, you can do it with my "Mirone" program.
Mirone doesn't know about shape files, but you can import simple ascii
files. If they are closed you are ofered the possibility to "Crop grid"
and to specify the outside polygon value (the NodataValue)

See
w3.ualg.pt/~jluis/mirone
but try instead (if you want, off course) the more updated versions at
ftp.ualg.pt/users/jluis/m_gmt/tmp




More information about the Gdal-dev mailing list