Learn R Programming

h3r (version 0.1.2)

latLngToCell: lat lng to cell

Description

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)

Value

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

Arguments

lat

latitude

lng

longitude

resolution

cell resolution

Examples

Run this code

latLngToCell(
  lat = c(-37.820197, -37.818476)
  , lng = c(144.983324, 144.967354)
  , resolution = c(12, 12)
  )

Run the code above in your browser using DataLab