ST_GeoHash
Generate a Geohash string from a point or coordinates. This function encodes spatial locations into short, alphanumeric strings for efficient indexing and proximity searches.
Syntax
ST_GeoHash(longitude, latitude, max_length)
ST_GeoHash(point, max_length)Description
Examples
SELECT ST_GeoHash(ST_GeomFromText('POINT(1 1)'),15), ST_GeoHash(0,30,15);
+----------------------------------------------+---------------------+
| ST_GeoHash(ST_GeomFromText('POINT(1 1)'),15) | ST_GeoHash(0,30,15) |
+----------------------------------------------+---------------------+
| s00twy01mtw037m | sj248j248j248j2 |
+----------------------------------------------+---------------------+See Also
Last updated
Was this helpful?

