(draft of) Generalized Geohash: a methodology for implementing hash functions that generate hierarchical base32 geocodes
Description
The global gridding schemes used for position representation on the surface of the Earth, also named discrete global grids (DGG), have a numeric identifier (ID) associated with each cell in the grid. A useful subtype, the recursive 4-region hierarchical DGGs, based on Hilbert, Z-order or similar spatial indexers, have their IDs structured with base4 (2 bits) numeric schemes, in order to reproduce the spatial hierarchy in the internal structure of the ID. The numerical representations base16 and base64 are options for the compact representation of the ID value, because they are powers of 4, which identify an internal cell with each added digit. However, when using as geocode the most common demand is by base32 (5 bits), which only displays the spatial grid hierarchy (structured in base4) every two digits. The solution adopted by Geohash was to represent its geocodes with an odd number of digits in a degenerate spatial grid. Generalized Geohash proposes to adopt the same strategy to enable the use of base32 in other indexes, including those based on Hilbert curve. The generalization consists of offering a general algorithm for the construction of the degenerate grid, from the union of two neighboring cells of the next hierarchical level. In applications oriented to the representation only of isolated points, or indexing of the Point-Region Quadtree type, loss of uniformity in the degenerate grid does not cause an impact nor is it even perceptible by the end user: with this hypothesis of work it was possible to establish a simple and comprehensive methodology , making possible the use of technologies such as S2geometry as alternatives to conventional Geohash. The reindexing algorithm and its geometry are also analyzed. In practical terms, it can be concluded that Generalized Geohash can contribute to the development of location-based addressing systems.