Calculates the perimeter length(s) for a polygon object

polyPerimeter(x)

Arguments

x

sp class SpatialPolygonsDataFrame object

Value

A vector of polygon perimeters

Author

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

library(sp) p1 <- Polygons(list(Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)))), "1") p2 <- Polygons(list(Polygon(cbind(c(5,4,2,5),c(2,3,2,2)))), "2") p3 <- Polygons(list(Polygon(cbind(c(4,4,5,10,4),c(5,3,2,5,5)))),"3") polys <- SpatialPolygons(list(p1,p2,p3), 1:3) polyPerimeter(polys)
#> [1] 9.634414 6.650282 15.245165