Learn R Programming

hexify (version 0.3.8)

hex_corners_to_sf: Build an sf POLYGON from six (lon, lat) corner pairs

Description

Low-level helper to create a single hexagon polygon from corner coordinates. Most users should use cell_to_sf instead.

Usage

hex_corners_to_sf(lon, lat, crs = 4326)

Value

sf object with one POLYGON geometry

Arguments

lon

numeric vector of length 6 (longitude)

lat

numeric vector of length 6 (latitude)

crs

integer CRS (default 4326)

See Also

Other sf conversion: hexify_cell_to_sf(), hexify_grid_global(), hexify_grid_rect()