h3forr: h3forr

Description Examples

Description

h3forr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(h3forr)

lat <- 37.3615593
lng <- -122.0553238
res <- 7

# Convert a lat/lng point to a hexagon index at resolution 7
h3_index <- geo_to_h3(c(lat, lng), res)

# Get the center of the hexagon
hex_center_coordinates <- h3_to_geo(h3_index)

# Get the vertices of the hexagon
h3_to_geo_boundary(h3_index)

crazycapivara/h3forr documentation built on Dec. 6, 2020, 5:21 a.m.