powered by
Given a vector of geometries, extract their centroids.
centroids(x)
an object of class rs_POINT
rs_POINT
an object of class rsgeo
rsgeo
lns <- geom_linestring(1:100, runif(100, -10, 10), rep.int(1:5, 20)) centroids(lns)
Run the code above in your browser using DataLab