Description Usage Arguments Value See Also Examples
gh_encode
generates geohashes of a
given precision from vectors of latitude and longitude values.
1 | gh_encode(lats, lngs, precision = 6L)
|
lats |
a numeric vector of latitude values. |
lngs |
a numeric vector of longitude values. Must be the same length
as |
precision |
an integer representing the precision the hashes should have. This should be between 1 and 10; if the precision requested is greater than 10, it will use 10 - if less than 1, it will error. |
a character vector of hashes, the same length as lat
and lng
,
with NA
values where one of the equivalent lat/lng pair was NA.
gh_decode
, for taking geohashes and turning them back into coordinates,
and gh_neighbours
for retrieving the neighbouring hashes to a particular hash.
1 2 3 | # A simple example:
gh_encode(lat = 42.60498046875, lng = -5.60302734375, precision = 5)
#[1] "ezs42"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.