I am using the R package geohashTools and I'd like to know all possible geohashes for a given level/precision. One way to do this is brute force.
# All possible coordinates
coord <- expand.grid(lon = seq(-180, 180, 0.1),
lat = seq(-90, 89.9, 0.1))
# Load library
library(geohashTools)
# Get all unique geohashes
geohashes <- unique(gh_encode(coord$lat, coord$lon, precision = 2L))
While this works, I'm guessing at what the resolution of my grid needs to be and, consequently, I could miss geohashes if it is too coarse or it could be really inefficient if the grid is too fine.
Q: Is there a more efficient and effective way of determining all geohashes at a given level?