gh_neighbors: Geohash neighborhoods

Description Usage Arguments Details Value Author(s) References Examples

Description

Return the geohashes adjacent to input geohashes

Usage

1
2
gh_neighbors(geohashes, self = TRUE)
gh_neighbours(geohashes, self = TRUE)

Arguments

geohashes

character vector of input geohashes. There's no need for all inputs to be of the same precision.

self

Should the input also be returned as a list element? Convenient for one-line usage / piping

Details

North/south-pole adjacent geohashes are missing three of their neighbors; these will be returned as NA_character_.

Value

list with character vector entries in the direction relative to the input geohashes indicated by their name (e.g. value$south gives all of the southern neighbors of the input geohashes).

The order is self (if self = TRUE), southwest, south, southeast, west, east, northwest, north, northeast (reflecting an easterly, then northerly traversal of the neighborhod).

Author(s)

Michael Chirico

References

http://geohash.org/ ( Gustavo Niemeyer's original geohash service )

Examples

1
gh_neighbors('d7q8u4')

geohashTools documentation built on July 1, 2020, 7:09 p.m.