gh_decode: Decode Geohashes

Description Usage Arguments Value See Also Examples

View source: R/RcppExports.R

Description

gh_decode takes geohashes and turns them back into latitude/longitude pairs, with an associated margin of error for each value.

Usage

1
gh_decode(hashes)

Arguments

hashes

a character vector of geohashes.

Value

a data.frame of four columns; "lat", "lng", "lat_error" and "lng_error"

See Also

gh_encode for generating geohashes, and gh_neighbours for identifying the neighbouring hash boxes to a geohash.

Examples

1
2
3
4
5
6
7
# A simple example:
gh_encode(lat = 42.60498046875, lng = -5.60302734375, precision = 5)
#[1] "ezs42"

gh_decode("ezs42")
# lat      lng      lat_error  lng_error
# 42.60498 -5.603027 0.02197266 0.02197266

Example output

[1] "ezs42"
       lat       lng  lat_error  lng_error
1 42.60498 -5.603027 0.02197266 0.02197266

geohash documentation built on Aug. 2, 2017, 5:01 p.m.