[GRASS-user] Clip a raster using a polygon boundary with r.mask

Asim asimrp at lavabit.com
Wed Jul 13 07:35:19 PDT 2022


Hello!

I've recently started using GRASS and finding it very cool.  The only 
other GIS software I'm familiar with is QGIS.

Today's newbie question is how to clip a raster using a vector having 
polygon geometries?  Judging by the docs, r.mask should be used with 
"vector=..." parameter.  The command "r.mask raster=big_raster 
vector=smaller_vector" was successful, mask was created.  However, when 
"big_raster" was added to the map layers in GUI, it was rendered in its 
entirety, without getting clipped. An operation such as r.to.vect on 
big_raster also resulted in the entire raster being used.

What am I missing?  Are there examples illustrating the use of "vector=" 
parameter in r.mask?

Asim




More information about the grass-user mailing list