Learn R Programming

terra (version 1.0-7)

centroids: Get centroids

Description

Get the centroids for the polygons of a SpatVector

Usage

# S4 method for SpatVector
centroids(x, ...)

Arguments

x

SpatVector

...

additional arguments. None implemented

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