gridcells_to_geohashes: Convert between Grid Cell Indices and Geohashes

View source: R/clusters.R

gridcells_to_geohashesR Documentation

Convert between Grid Cell Indices and Geohashes

Description

Converts between Web Mercator (EPSG:3857) quadtree grid cell indices and binary geohashes.

Usage

gridcells_to_geohashes(xyz)

geohashes_to_gridcells(geohashes)

Arguments

xyz

Rows of Web Mercator grid cell indices (x, y, zoom).

geohashes

A character vector of geohashes.

Examples

xi <- c(0, 0, 1, 0)
yi <- c(0, 1, 1, 0)
zoom <- c(0, 1, 1, 2)
xyz <- cbind(xi, yi, zoom)
geohashes <- gridcells_to_geohashes(xyz)
xyz <- geohashes_to_gridcells(geohashes)
geohashes == gridcells_to_geohashes(xyz)

falling-fruit/fruitr documentation built on Dec. 21, 2024, 8:32 p.m.