[GRASS-user] Cut DEM by SHP

Hamish hamish_nospam at yahoo.com
Mon Nov 27 18:45:32 EST 2006


> But with MASK is it not permanent?
> while with r.mapcalc it's permanent map.

The mask will be in place as long as a raster map named "MASK" is there.
This affects maps that are read, not written.

for example:   (spearfish dataset)

# will only save roads where the MASK is, as that is the only data read
r.mapcalc "MASK=if(isnull(fields))"
r.mapcalc test_rast=roads
g.remove MASK
d.rast test_rast


# will create map over entire region, regardless of MASK
r.mapcalc "MASK=if(isnull(fields))"
r.mapcalc "test_num = x() * y()"
g.remove MASK
d.rast test_num


in that way, MASK can have a permanent effect to newly written maps.


Hamish




More information about the grass-user mailing list