
Last chance! 50% off unlimited learning
Sale ends in
Calculates the perimeter length(s) for a polygon object
polyPerimeter(x)
A vector of polygon perimeters in projection units
sf POLYGON class object
Jeffrey S. Evans <jeffrey_evans@tnc.org>
if(require(sf, quietly = TRUE)) {
polys <- st_read(system.file("shape/nc.shp", package="sf"))
polys <- suppressWarnings(st_cast(polys[c(10,100),], "POLYGON"))
polyPerimeter(polys)
}
Run the code above in your browser using DataLab