Open MichaelChirico opened 6 years ago
Yeah, those'd be my concerns too
I'm just noticing the gh_neighbour
internal function... with that, the names of the neighbors are well-defined, i.e. geohash:::gh_neighbour('dqcjqc', c(1, -2))
gives dqcjq6
unambiguously.
Corollary:
n_neighbors > 1
(NW-W
would be NWW
in echo of the input to gh_neighbour
gh_neighbour
, and let people stitch together the n_neighbors
argument by hand in a way which fits their current use case.
It might be nice to allow gh_neighbors to more flexibly return not just the neighbors, but the neighbors' neighbors (up to distinctness, i.e. for
n_neighbors = k
there should be(k+2)^2 - 1
geohashes returned), e.g.The 24 GH returned would be: 1 .
NW-NW
-dqcjq7
NW-N
-dqcjqe
N-N
-dqcjqg
N-NE
-dqcjr5
NE-NE
-dqcjr7
NE-E
-dqcjr6
E-E
-dqcjr3
SE-E
-dqcjr2
SE-SE
-dqcjpr
SE-S
-dqcjpp
S-S
-dqcjnz
SW-S
-dqcjnx
SW-SW
-dqcjnr
SW-W
-dqcjq2
W-W
-dqcjq3
NW-W
-dqcjq6
NW
-dqcjqd
N
-dqcjqf
NE
-dqcjr4
E
-dqcjr1
SE
-dqcjr0
S
-dqcjqb
SW
-dqcjq8
W
-dqcjq9
A few potential issues:
NW-W
is the same asW-NW