NEW
A geocoding system encoding latitude–longitude into a base32 string with hierarchical spatial precision.
DESCRIPTION
Geohash divides the globe into a grid and encodes cell locations as base32 strings, where longer strings represent finer precision. Prefix matching supports spatial proximity searches and bucketing. It underpins grid aggregations and geospatial indexing in search, caching, and time-series systems. However, geohash cells are rectangular and distort near poles. Alternatives like H3 or S2 provide different tiling and neighborhood properties.
ALTERNATIVE DEFINITIONS
Geohash
Geohash is a public domain geocoding system which encodes a geographic location into a short string of letters and digits.
Emphasizes public domain status and short alphanumeric encoding.
OpenStreetMap Wiki
Geohash is a system for encoding a latitude/longitude pair into a single base32 string.
Highlights base32 single-string representation and mapping community usage.
RELATED TERMS
Spatial Index Morton Order Space-filling Curve Bounding Box Tiling Geocoding Location Encoding
COMPETING TERMS
H3 S2 Geometry Quadkey
KNOWLEDGE AREAS
Data Engineering Real-time & Streaming Data Data Storage & Operations Data Science
TARGET AUDIENCE
Data Engineer Software Developer Data Scientist MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Geohash
- Elasticsearch - Geohash grid aggregation usage.
- PostGIS - Function to encode geometries to geohash.
- Redis - Redis GEO commands with geohash indexing.
TOP QUESTIONS
How does Geohash enable proximity search?
Geohash prefixes represent larger areas; nearby points often share prefixes. Searching by neighboring prefixes approximates proximity efficiently.
Category: Concepts
What precision should I choose for Geohash?
Choose length based on application resolution—shorter for coarse aggregation, longer for precise location. Typical lengths range from 5 to 9 characters.
Category: Guidance
What are Geohash’s limitations?
Cell shapes distort near poles and adjacency is not uniform around boundaries, sometimes requiring multiple neighbor prefixes.
Category: Limitations
When should I prefer H3 over Geohash?
Choose H3 for hexagonal tiling, better neighborhood properties, and multi-resolution analytics. Geohash may be sufficient for simple grid aggregations.
Category: Alternatives
Is Geohash deterministic and reversible?
Yes. Given a geohash string and its length, you can derive its bounding box and centroid.
Category: Properties
How is Geohash used in databases?
Search engines and databases use geohash for grid aggregations, bucketing, and prefiltering before precise geometry checks.
Category: Applications
Does Geohash support time dimensions?
Not inherently. Some systems concatenate time with geohash (space-time keys) for spatiotemporal indexing.
Category: Scope
What is a Geohash neighbor?
A geohash neighbor is an adjacent cell sharing a boundary; algorithms compute neighbor hashes for coverage queries.
Category: Concepts
Does Geohash work well near the anti-meridian?
Yes, but careful handling is required; wrapping logic ensures correct neighbor and range calculations around ±180° longitude.
Category: Edge cases