Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

st_geohash

compute geohash from (average) coordinates


Description

compute geohash from (average) coordinates

Usage

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

Value

character vector with geohashes

Examples

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

Bindings to Selected 'liblwgeom' Functions for Simple Features

v0.2-6
GPL-2
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Colin Rundel [ctb], Andy Teucher [ctb], liblwgeom developers [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.