gh_decode.Rd
Convert geohash-encoded strings into latitude/longitude coordinates
gh_decode(geohashes, include_delta = FALSE, coord_loc = 'c')
geohashes |
|
---|---|
include_delta |
|
coord_loc |
|
coord_loc
can be the cell's center ('c'
or 'centroid'
), or it can be any of the 8 corners (e.g. 's'
/'south'
for the midpoint of the southern boundary of the cell, or 'ne'
/'northeast'
for the upper-right corner.
For factor
input, decoding will be done on the levels for efficiency.
list
with the following entries:
numeric
vector of latitudes (y-coordinates) corresponding to the input geohashes
, with within-cell position dictated by coord_loc
numeric
vector of longitudes (x-coordinates) corresponding to the input geohashes
, with within-cell position dictated by coord_loc
numeric
vector of cell half-widths in the y direction (only included if include_delta
is TRUE
numeric
vector of cell half-widths in the x direction (only included if include_delta
is TRUE
http://geohash.org/ ( Gustavo Niemeyer's original geohash service )
# Riddle me this gh_decode('stq4s8c')#> $latitude #> [1] 29.97551 #> #> $longitude #> [1] 31.13731 #># Cell half-widths might be convenient to include for downstream analysis gh_decode('tjmd79', include_delta = TRUE)#> $latitude #> [1] 29.935 #> #> $longitude #> [1] 52.89368 #> #> $delta_latitude #> [1] 0.002746582 #> #> $delta_longitude #> [1] 0.005493164 #>