Skip to contents

Converts geographic coordinates to DGGRID-compatible cell identifiers. This is the primary function for geocoding points to grid cells.

Usage

hexify_lonlat_to_cell(lon, lat, resolution, aperture)

Arguments

lon

Numeric vector of longitudes in degrees

lat

Numeric vector of latitudes in degrees

resolution

Grid resolution (integer >= 0)

aperture

Grid aperture (3, 4, or 7)

Value

Numeric vector of cell IDs (1-based)

Details

Returns DGGRID-compatible cell identifiers. The cell ID uniquely identifies each hexagonal cell in the global grid.

For a grid-object interface, use lonlat_to_cell.

Examples

cell_id <- hexify_lonlat_to_cell(0, 45, resolution = 5, aperture = 3)