getcontour function

Computes the Contour Polygon of a Raster Object

Computes the Contour Polygon of a Raster Object

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)

Arguments

  • sp: an object of class SpatialPixelsDataFrame

Returns

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)
  • Maintainer: Clement Calenge
  • License: GPL (>= 2)
  • Last published: 2024-09-06

Useful links

    Downloads (last 30 days):