Skip to contents

Returns the geographic coordinates of an indexed cell's center. This is a cell-level inverse of hexify_lonlat_to_index(): the returned point is the center, not necessarily the original input point.

Usage

hexify_index_to_lonlat(
  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. Default "auto" infers from aperture.

Value

A data frame with lon and lat columns in degrees, one row per index.

Examples

coords <- hexify_index_to_lonlat("0012012", aperture = 3)