Description Usage Arguments Value Warning Author(s) See Also Examples
getcontour
computes the contour polygon of a raster object
of class asc
. When the object is made of several parts, the
function returns one polygon per part.
1 | getcontour(x)
|
x |
an object of class |
Returns an object of class area
.
Holes in the polygons are not taken into account by the function.
Clement Calenge clement.calenge@oncfs.gouv.fr
asc
for additionnal information on
objects of class asc
, area
for
additional information on objects of class area
, and
area2dxf
to export the results toward a GIS.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | data(puechabon)
kasc <- puechabon$kasc
#########################################
## Example with one object:
## Gets the first map of the "kasc" object
## Map of the elevation
elev <- getkasc(kasc, "Elevation")
image(elev)
## Get the contour polygon
cpol <- getcontour(elev)
## Draw the polygon
i <- cpol[,2:3]
polygon(i, col = "green", lwd = 2)
#########################################
## Example with two objects:
## home ranges of wild boar
hr <- getsahrlocs(puechabon$sahr, "hr")
u <- getkasc(hr, "Jean")
image(u)
## Get the contour polygons
p <- getcontour(u)
plot(p, lwd = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.