Decode a Geohash to retrieve the longitude. This function returns the longitude coordinate (X-axis) from a given Geohash string.
Decodes a given geohash string and returns the longitude in the interval [180, -180].
If the argument is NULL, the return value is NULL. If the argument is invalid, an ER_INCORRECT_TYPE error is thrown.
The function can be used to generate geohashes.
This page is licensed: CC BY-SA / Gnu FDL
ST_LongFromGeoHash(geohash)SELECT ST_LongFromGeoHash('zzzzzzzzz'), ST_LongFromGeoHash('sj248j248j248j2');
+---------------------------------+---------------------------------------+
| ST_LongFromGeoHash('zzzzzzzzz') | ST_LongFromGeoHash('sj248j248j248j2') |
+---------------------------------+---------------------------------------+
| 180 | 0 |
+---------------------------------+---------------------------------------+