50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


terra (version 1.4-9)

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