geo_to_h3: Index geo-coordinates at the given resolution into H3...

View source: R/h3_indexing.R

geo_to_h3R Documentation

Index geo-coordinates at the given resolution into H3 addresses.

Description

Index geo-coordinates at the given resolution into H3 addresses.

Usage

geo_to_h3(latlng, res)

## S3 method for class 'numeric'
geo_to_h3(latlng, res = 7)

## S3 method for class 'matrix'
geo_to_h3(latlng, res = 7)

## S3 method for class 'data.frame'
geo_to_h3(latlng, res = 7)

## S3 method for class 'sf'
geo_to_h3(latlng, res = 7)

Arguments

latlng

geo-coordinates as lat/lng pairs or object of class sf

res

resolution between 0 and 15

Value

character vector

Examples

road_safety_greater_manchester[1:3, ] %>%
  geo_to_h3()

crazycapivara/h3-r documentation built on Aug. 10, 2022, 1:17 p.m.