getcontour: 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)
Value
Returns an object of class SpatialPolygons.
Arguments
sp
an object of class SpatialPixelsDataFrame
Warning
Holes in the polygons are not taken into account by the function.
data(meuse.grid)
a <- SpatialPixelsDataFrame(points = meuse.grid[c("x", "y")],
data = meuse.grid)
## the contour of the mapgc <- getcontour(a[,1])
plot(gc)