All pages
Powered by GitBook
1 of 1

ST_LongFromGeoHash

ST_LongFromGeoHash is available from MariaDB 12.0.

Syntax

ST_LongFromGeoHash(geohash)

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 ST_GeoHash function can be used to generate geohashes.

Examples

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

See Also

  • ST_GeoHash

  • ST_LatFromGeoHash

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