getcontour | R Documentation |
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.
getcontour(sp)
sp |
an object of class |
Returns an object of class SpatialPolygons
.
Holes in the polygons are not taken into account by the function.
Clement Calenge clement.calenge@ofb.gouv.fr
SpatialPixelsDataFrame-class
for additionnal
information on objects of class SpatialPixelsDataFrame
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.