Get the centroids for the polygons of a SpatVector
# S4 method for SpatVector
centroids(x)
SpatVector
SpatVector of points
# 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