On 19/08/2011 08:52, H.S.Rai wrote:

Is it possible to clip (crop) a rectangular DTM raster with irregular
boundary of city (as vector map), so that I can view only city area
filled with DTM. nothing beyond that.

If this can be done, then which command or option will do this?

Please help me.

Here are two suggestions:

You can use the '-cutline' option to gdalwarp to clip a raster to a polygon. Have a look at this blogpost for details:  http://linfiniti.com/2009/09/clipping-rasters-with-gdal-using-polygons/


Within GRASS, you can rasterize the clip polygon calling in "MASK":

v.to.rast in=city out=MASK use-val value=1

THen run:

 r.mapcalc clipped_DTM=original_DTM

Since r.mapcalc honors the MASK, the new raster should be clipped to the city polygon.

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to