polygon_at_distance: Generate the polygon at distance d from a geographical...

View source: R/utils-spatial.R

polygon_at_distanceR Documentation

Generate the polygon at distance d from a geographical location

Description

\lifecycle

experimental

polygon_at_distance returns a polygon approximating a circonference at distance d, in Nautical Miles, from the location geo. You can control how many points per quadrant will be used via the nQuadSegs parameter (the default of 30 from st_buffer should suffice for most of the needs.)

WARNING: this is not tested to work across the date line or for polygons containing the poles or for polygons spanning more than half an emisphere.

Usage

polygon_at_distance(geo, d, ...)

Arguments

geo

a geographical location in lon/lat (WGS84)

d

a distance in Nautical Miles

...

other parameters, for example nQuadSegs; see also st_buffer

Value

a polygon.

See Also

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

Examples

## Not run: 
fra <- c(8.570556, 50.03333) # Frankfurt Airport (longitude, latitude)
polygon_at_distance(fra, 40)

## End(Not run)

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