Core Geohashing API Overview
masterThe geo library provides high-performance, thread-safe utility methods for geohashing. Key capabilities include:
- Encoding: Convert latitude and longitude to geohashes of arbitrary length using
GeoHash.encodeHash. - Decoding: Convert geohashes back to latitude and longitude using
GeoHash.decodeHash. - Adjacency: Find a single adjacent hash in any direction (including poles) via
GeoHash.adjacentHash, or find all 8 neighbors usingGeoHash.neighbours. - Bounding Box Support:
- Calculate the required hash length to enclose a bounding box with
GeoHash.hashLengthToCoverBoundingBox. - Generate a set of geohashes that cover a bounding box along with their coverage ratio using
GeoHash.coverBoundingBox.
- Calculate the required hash length to enclose a bounding box with
- Dimensions: Calculate the height and width of a geohash in degrees using
GeoHash.heightDegreesandGeoHash.widthDegrees. - Base32 Conversion: Encode and decode
longvalues from geohashes usingBase32.encodeBase32andBase32.decodeBase32.