Skip to contents

The hull of a range that crosses the antimeridian must not wrap the long way round the globe. The points are hulled in whichever longitude frame holds them in the narrower span (lon_span(): -180..180, or 0..360 for a Pacific-centred range), and the hull is returned cut at the antimeridian and shifted back, so it can be rasterized onto a -180..180 grid.

Usage

range_hull(lon, lat)

Arguments

lon, lat

coordinates of the points (decimal degrees, -180..180)

Value

an sfc (EPSG:4326) of one POLYGON or MULTIPOLYGON; empty with fewer than 3 points

Details

The hull is planar in longitude / latitude, as OBIS's convex_hull mask is.