Skip to contents

[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.

Examples

if (FALSE) {
fra <- c(8.570556, 50.03333) # Frankfurt Airport (longitude, latitude)
polygon_at_distance(fra, 40)
}