Skip to contents

Maps longitude/latitude coordinates to A5 cell indices at the specified resolution.

Usage

a5_lonlat_to_cell(lon, lat, resolution)

Arguments

lon

Numeric vector of longitudes in degrees.

lat

Numeric vector of latitudes in degrees.

resolution

Integer scalar or vector of resolutions (0–30).

Value

An a5_cell vector of cell indices.

See also

a5_cell_to_lonlat() for the inverse operation.

Examples

a5_lonlat_to_cell(-3.19, 55.95, resolution = 5)
#> <a5_cell[1]>
#> [1] 633e000000000000