Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

res_length

Get H3 cell edge length


Description

This function returns the average edge length of an H3 cell edge at a given resolution.

Usage

res_length(res = NULL, units = c("m", "km"), fast = TRUE)

Arguments

res

Integer; Desired H3 resolution. See https://h3geo.org/docs/core-library/restable/ for allowable values and related dimensions.

units

Length unit to report in, either meters or kilometers.

fast

Logical; whether to retieve values from a locally stored table or reclaculate from source.

Value

Numeric; H3 cell edge length

Note

This value is also the hexagon circumradius.

Examples

# Return average H3 cell edge length at each resolution in kilometers
res_length(res = seq(0, 15), units = 'km')

h3jsr

Access Uber's H3 Library

v1.2.2
Apache License (>= 2)
Authors
Lauren O'Brien [aut, cre] (<https://orcid.org/0000-0002-7336-2171>)
Initial release
2021-06-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.