centroids: Extract Centroids

View source: R/extendr-wrappers.R

centroidsR Documentation

Extract Centroids

Description

Given a vector of geometries, extract their centroids.

Usage

centroids(x)

Arguments

x

an object of class rsgeo

Value

an object of class rs_POINT

Examples

lns <- geom_linestring(1:100, runif(100, -10, 10), rep.int(1:5, 20))
centroids(lns)

rsgeo documentation built on Sept. 9, 2023, 1:07 a.m.