Expand description
Constants§
- RUNE_
INDEX_ LEN - Length of rune of possible GeoHash characters -1 to represent the largest index in the rune.
- RUNE_
LEN - Length of rune of possible GeoHash characters.
Statics§
- GEOHASH_
ID_ RANGE - Number of possible GeoHashes for a given precision. All common ranges (0 through 12) are calculated at compile time and can be accessed by using the precision as the index.
- RUNE_
CHAR_ INDEX - Rune of possible GeoHash characters. Values (char) are mapped to their relative index (usize) in the rune.
- RUNE_
INDEX_ CHAR - Rune of possible GeoHash characters. Relative indexes (static str) in the rune are mapped to their values (char).
Functions§
- geohash_
id_ range - Calculate the number of possible GeoHashes for a given precision.
- geohash_
to_ int - Convert a GeoHash to an int.
The int range is based on the number of possible combinations of characters from the GeoHash rune. - int_
to_ geohash - Convert a the previous generated GeoHash int, the
geohash_id, back to the GeoHash.
Theprecisionthat was used at the time of encoding is needed to correctly convert back to the original GeoHash.