lawn_center: Get center point

Description Usage Arguments Value See Also Examples

View source: R/center.R

Description

Takes a data-FeatureCollection and returns the absolute center point of all features.

Usage

1
lawn_center(features, properties = NULL, lint = FALSE)

Arguments

features

Input features, as a data-Feature or data-FeatureCollection

properties

A list of properties. Default: NULL

lint

(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

A data-Point feature at the absolute center point of all input features.

See Also

Other measurements: lawn_along(), lawn_area(), lawn_bbox_polygon(), lawn_bbox(), lawn_bearing(), lawn_center_of_mass(), lawn_centroid(), lawn_destination(), lawn_distance(), lawn_envelope(), lawn_extent(), lawn_line_distance(), lawn_midpoint(), lawn_point_on_feature(), lawn_pt2line_distance(), lawn_square()

Examples

1
2
3
4
5
6
7
8
9
lawn_center(lawn_data$points_average)
lawn_center(lawn_data$points_average, properties = list(
  foo = "bar", hello = "world"))
## Not run: 
lawn_center(lawn_data$points_average) %>% view
lawn_featurecollection(lawn_data$points_average) %>% view
lawn_center(lawn_data$points_average) %>% view

## End(Not run)

lawn documentation built on Jan. 6, 2021, 5:07 p.m.