Crop Raster

The function "CropRaster" allows to cut a raster file on the basis of a vector layer. The result of this operation is a raster layer which extends over the maximal influence of the vector layer) (the cutting does not follow the vector shape, it gets back coordinates min / max of the vector layer)


Syntax : select CropRaster(r.raster, f.the_geom) as raster from mytif r, fence f;


Example :

       - Goal : Cut a DEM (which extends throughout France), according to a fence

       - Syntax : select CropRaster(r.raster, f.the_geom) as raster from France_DEM_1000 r, fence f;

       - Remark : the raster is the DEM, called "France_DEM_1000" and the fence is the yellow polygon.

       - Result :


Remark : In this request we use a fence as the vector layer. Naturally you can replace it by a vector layer presents in your Geocatalog (and even to add a condition like: where the name of the department is "XX")

Copyright - IRSTV - 2009 - www.orbisgis.org