st_geohash: compute geohash from (average) coordinates

Description Usage Arguments Details Value Examples

View source: R/geohash.R

Description

compute geohash from (average) coordinates

Usage

1
st_geohash(x, precision = 0)

Arguments

x

object of class sf, sfc or sfg

precision

integer; precision (length) of geohash returned. From the liblwgeom source: “where the precision is non-positive, a precision based on the bounds of the feature. Big features have loose precision. Small features have tight precision.”

Details

see http://geohash.org/ or https://en.wikipedia.org/wiki/Geohash.

Value

character vector with geohashes

Examples

1
2
3
library(sf)
lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 2)
lwgeom::st_geohash(st_sfc(st_point(c(1.5,3.5)), st_point(c(0,90))), 10)

lwgeom documentation built on Oct. 6, 2021, 5:12 p.m.

Related to st_geohash in lwgeom...