Skip to contents

Indexes points to H3 cells at res via the DuckDB h3 extension. Ids are returned as BIGINT (bit64::integer64 in R) — every valid H3 index reserves bit 63, so it fits in signed 64-bit, and BIGINT matches the OBIS h3t store (idx_h3.cell_id) for cast-free joins. Use hex_id_to_string() for the hex-string form.

Usage

hex_id_from_lonlat(lon, lat, res = HEX_RES, con = NULL)

Arguments

lon, lat

numeric vectors of longitude / latitude (EPSG:4326)

res

H3 resolution (default HEX_RES)

con

optional DuckDB connection (a temporary integer64 one if NULL)

Value

an integer64 vector of H3 ids, aligned to the inputs