This function takes point location data and returns a H3 cell index for each point at the chosen resolution(s).
Arguments
- input
sfobject with point geometry,sfc_POINTobject,sfgpoint, data frame or matrix.- res
Integer; Desired H3 resolution. See https://h3geo.org/docs/core-library/restable/ for allowable values and related dimensions.
- simple
Logical; whether to return outputs as character vector where possible.
Value
if
simple = TRUEand one resolution is requested, a character vector of H3 addresses.if
simple = TRUEand multiple resolutions are requested, a data frame of H3 addresses.if
simple = FALSEand a matrix, sfc or sfg object is supplied, a data frame of H3 addresses.if
simple = FALSEand a data frame or sf object with other attributes is supplied, a data frame of non-spatial attributes with new columns containing addresses for one or more H3 resolutions.