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

uncompact

Uncompact H3 cell indices


Description

This function uncompacts a compacted set of H3 cells to indices of the target resolution.

Usage

uncompact(h3_addresses = NULL, res = NULL, simple = TRUE)

Arguments

h3_addresses

Character vector or list of 15-character cell indices generated by H3.

res

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

simple

Logical; whether to return a vector of outputs or a list object containing both inputs and outputs.

Value

A list of H3 cell indices of the chosen resolution.

Examples

## Not run: 
# Give me a compacted representation of County Ashe, NC
nc <- sf::st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
nc1 <- nc[1, ]
nc1 <- sf::st_cast(nc1, 'POLYGON')
fillers <- polyfill(geometry = nc1, res = 6)
compacted <- compact(fillers)
# uncompact to resolution 7
uncompacted <- uncompact(compacted, res = 7)

## End(Not run)

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.