Skip to contents

Indexes the location at the specified resolution, returning the index of the cell containing the location. This buckets the geographic point into the H3 grid

Usage

latLngToCell(lat, lng, resolution)

Arguments

lat

latitude

lng

longitude

resolution

cell resolution

Value

vector giving the H3 cell for each input lat/lng pair, at the given resolution

Examples


latLngToCell(
  lat = c(-37.820197, -37.818476)
  , lng = c(144.983324, 144.967354)
  , resolution = c(12, 12)
  )
#> [1] "8cbe63562a54bff" "8cbe635631103ff"