Projects geographic coordinates to grid cells and returns their hierarchical
index strings. Inputs are vectorized over lon and lat.
Usage
hexify_lonlat_to_index(
lon,
lat,
resolution,
aperture = 3L,
index_type = c("auto", "z3", "z7", "zorder")
)
Arguments
- lon
Longitudes in degrees
- lat
Latitudes in degrees
- resolution
Resolution level
- aperture
Aperture (3, 4, or 7)
- index_type
Index encoding: "auto" (default), "z3", "z7", or "zorder"
Value
A character vector of index strings, one per point. lon and lat
must be the same length.
Examples
idx <- hexify_lonlat_to_index(16.37, 48.21, resolution = 5, aperture = 3)
idx7 <- hexify_lonlat_to_index(16.37, 48.21,
resolution = 4, aperture = 7
)