neighbours: Get neighbours to geohashes

Description Usage Arguments See Also Examples

Description

Geohashes are calculated using a fixed-sized box, which means it's easy to take a geohash and extract the neighbouring boxes around it, in each direction. These functions either extract all neighbours, or individual neighbours, depending on your preference.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
gh_neighbours(hashes)

north(hashes)

northeast(hashes)

east(hashes)

southeast(hashes)

south(hashes)

southwest(hashes)

west(hashes)

northwest(hashes)

Arguments

hashes

a vector of geohashes, which can be computed with gh_encode

See Also

gh_encode for generating hashes and gh_decode for resolving them into latitude and longitude pairs.

Examples

1
2
3
4
5
#Get a single neighbours
north("ezs42")

#Get all neighbours!
gh_neighbours("ezs42")

Ironholds/geohash documentation built on May 7, 2019, 6:40 a.m.