ps_sfcs_centroid: Find centroid of sfcs

ps_sfcs_centroidR Documentation

Find centroid of sfcs

Description

Centroid can be found for multiple sfc columns and any geometry type. For polygon and linestring data, centroid is calculated from vertices. Sfc columns must have same crs and should not be longitude/latitude.

Usage

ps_sfcs_centroid(x, sfc_names = ps_sfc_names(x), union = TRUE)

Arguments

x

The object

sfc_names

A character vector of the sfc column names

union

A flag indicating whether to use st_union() (the default) versus st_combine() prior to st_centroid()

Value

Sf object of centroid


poissonconsulting/poisspatial documentation built on Nov. 9, 2023, 10:09 a.m.