Learn R Programming

terra (version 1.8-10)

perim: Perimeter or length

Description

This method returns the length of lines or the perimeter of polygons.

When the coordinate reference system is not longitude/latitude, you may get more accurate results by first transforming the data to longitude/latitude with project

Usage

# S4 method for SpatVector
perim(x)

Value

numeric (m)

Arguments

x

SpatVector

Examples

Run this code
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
perim(v)

Run the code above in your browser using DataLab