Skip to contents

Decodes a hierarchical index string back to its cell coordinates and resolution. For Z7, valid indices round-trip exactly through hexify_cell_to_index().

Usage

hexify_index_to_cell(
  index,
  aperture = 3L,
  index_type = c("auto", "z3", "z7", "zorder")
)

Arguments

index

Character vector of index strings

aperture

Aperture (3, 4, or 7)

index_type

Index encoding used. Default "auto" infers from aperture.

Value

A data frame with columns face, i, j and resolution, one row per index.

Examples

cell <- hexify_index_to_cell("0012012", aperture = 3)

z7_cell <- hexify_index_to_cell("110001", aperture = 7)
hexify_cell_to_index(z7_cell$face, z7_cell$i, z7_cell$j,
  z7_cell$resolution, aperture = 7
)