perarea: Compute Perimeters of Objects of Class...

Description Usage Arguments Value Author(s) See Also Examples

Description

calcperimeter computes the perimeters of polygons in objects of class SpatialPolygonsDataFrame and PolyLinesDataFrame.

Usage

1

Arguments

x

object of class SpatialPolygonsDataFrame or PolyLinesDataFrame

Value

an object of class SpatialPolygonsDataFrame or PolyLinesDataFrame with an additionnal column containing the perimeter of the polygons/polylines.

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

SpatialPolygonsDataFrame-class for additionnal information on objects of class SpatialPolygonsDataFrame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

## Transforms the SpatialPolygons into SpatialPolygonsDataFrame
gc <- SpatialPolygonsDataFrame(gc, data.frame(x=1))

## The perimeter of this map (in units of the data):
ii <- calcperimeter(gc)
as.data.frame(ii)


Search within the adehabitatMA package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.