Learn R Programming

terra (version 1.2-10)

centroids: Get centroids

Description

Get the centroids for the polygons of a SpatVector

Usage

# S4 method for SpatVector
centroids(x)

Arguments

x

SpatVector

Value

SpatVector of points

Examples

Run this code
# NOT RUN {
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
x <- centroids(v)
# }

Run the code above in your browser using DataLab