Description Usage Arguments Details Value Author(s) See Also Examples
mcp.rast
converts a polygon map to a raster map of class
asc
.
1 |
poly |
a data frame with 2 columns giving the coordinates of a polygon object |
w |
an object of class |
border |
a character string indicating what happens when the
center of the pixel is located exactly on the limit of the polygon
( |
The raster map is needed to pass the format for the output raster object to the function.
Returns an object of class asc
.
Clement Calenge clement.calenge@oncfs.gouv.fr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(puechabon)
toto <- puechabon$kasc
loc <- puechabon$locs
## gets the coordinates of the relocations for the wild boar #1
wb1 <- loc[loc$Name == "Chou",]
wb1 <- cbind(wb1$X, wb1$Y)
nbpol <- chull(wb1)
xycoord <- wb1[nbpol,]
## rasterization of wb1
tutu <- mcp.rast(xycoord, toto)
image(tutu)
polygon(xycoord, lwd = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.