All pages
Powered by GitBook
1 of 1

Loading...

ST_LongFromGeoHash

Decode a Geohash to retrieve the longitude. This function returns the longitude coordinate (X-axis) from a given Geohash string.

ST_LongFromGeoHash is available from MariaDB 12.0.

Syntax

Description

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.

Examples

See Also

This page is licensed: CC BY-SA / Gnu FDL

ST_LongFromGeoHash(geohash)
ST_GeoHash
ST_GeoHash
ST_LatFromGeoHash
SELECT ST_LongFromGeoHash('zzzzzzzzz'), ST_LongFromGeoHash('sj248j248j248j2');           
+---------------------------------+---------------------------------------+
| ST_LongFromGeoHash('zzzzzzzzz') | ST_LongFromGeoHash('sj248j248j248j2') |
+---------------------------------+---------------------------------------+
|                             180 |                                     0 |
+---------------------------------+---------------------------------------+