Description Usage Arguments Value Author(s) See Also Examples
Applies a mask on objects of class asc or kasc. In other
words, the function creates an object of class asc or
kasc, with NA for all pixels NA on the masking map.
1 | setmask(x, mask)
|
x |
an object of class |
mask |
an object of class |
Returns an object of class asc or kasc
Clement Calenge clement.calenge@oncfs.gouv.fr
asc for additionnal information on
objects of class asc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(puechabon)
kasc <- puechabon$kasc
image(kasc)
elev <- getkasc(kasc, "Elevation")
slope <- getkasc(kasc, "Slope")
## ma is the mask: only areas with elevation > 250 m
## are kept
ma <- elev
ma[ma < 250] <- NA
ma <- getascattr(elev, ma)
image(ma)
## The mask is applied on maps of slope
slp <- setmask(slope, ma)
image(slp)
## The mask is applied on all maps in kasc
im <- setmask(kasc, ma)
image(im)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.