getcontour {adehabitatMA} | R Documentation |
Computes the Contour Polygon of a Raster Object
Description
getcontour
computes the contour polygon of a raster object
of class SpatialPixelsDataFrame
. When the object is made of
several parts, the function returns one polygon per part.
Usage
getcontour(sp)
Arguments
sp |
an object of class |
Value
Returns an object of class SpatialPolygons
.
Warning
Holes in the polygons are not taken into account by the function.
Author(s)
Clement Calenge clement.calenge@ofb.gouv.fr
See Also
SpatialPixelsDataFrame-class
for additionnal
information on objects of class SpatialPixelsDataFrame
.
Examples
data(meuse.grid)
a <- SpatialPixelsDataFrame(points = meuse.grid[c("x", "y")],
data = meuse.grid)
## the contour of the map
gc <- getcontour(a[,1])
plot(gc)
[Package adehabitatMA version 0.3.16 Index]