polygon_from_coords: Return a polygon from (WGS84) coordinates

View source: R/utils-spatial.R

polygon_from_coordsR Documentation

Return a polygon from (WGS84) coordinates

Description

Return a polygon from (WGS84) coordinates

Usage

polygon_from_coords(coords, dfMaxLength = units::set_units(1, "km"))

Arguments

coords

coordinates defining a polygon

dfMaxLength

maximum length of a line segment. If x has geographical coordinates (long/lat), dfMaxLength is either a numeric expressed in meter, or an object of class units with length units rad or degree; segmentation in the long/lat case takes place along the great circle, using st_geod_segmentize.

Value

an sf polygon

See Also

Other spatial: bbox_at_distance(), bounding_box(), crs_tc(), filter_positions_at_range(), polygon_at_distance()

Examples

## Not run: 
coords <- list(rbind(c(0, 0), c(1, 0), c(1, 1), c(0.5, 1.5), c(0, 1), c(0, 0)))
polygon_from_coords(coords)

## End(Not run)

euctrl-pru/trrrj documentation built on April 15, 2024, 1:24 p.m.