Learn R Programming

rsgeo (version 0.1.7)

centroids: Extract Centroids

Description

Given a vector of geometries, extract their centroids.

Usage

centroids(x)

Value

an object of class rs_POINT

Arguments

x

an object of class rsgeo

Examples

Run this code
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