mysql> SELECT ST_GeoHash(180,0,10), ST_GeoHash(-180,-90,15); +----------------------+-------------------------+ | ST_GeoHash(180,0,10) | ST_GeoHash(-180,-90,15) | +----------------------+-------------------------+ | xbpbpbpbpb | 000000000000000 | +----------------------+-------------------------+ 

• ST_LatFromGeoHash( geohash_str ) 

Returns the latitude from a geohash string value, as a double-precision number in the range [ − 90, 90]. 

The ST_LatFromGeoHash()  decoding function reads no more than 433 characters from the geohash_str  argument. That represents the upper limit on information in the internal representation of coordinate values. Characters past the 433rd are ignored, even if they are otherwise illegal and produce an error. 

ST_LatFromGeoHash()  handles its arguments as described in the introduction to this section. 

mysql> SELECT ST_LatFromGeoHash(ST_GeoHash(45,-20,10)); +------------------------------------------+ | ST_LatFromGeoHash(ST_GeoHash(45,-20,10)) | +------------------------------------------+ | -20 | +------------------------------------------+ 

• ST_LongFromGeoHash( geohash_str ) 

Returns the longitude from a geohash string value, as a double-precision number in the range [ − 180, 180]. 

The remarks in the description of ST_LatFromGeoHash()  regarding the maximum number of characters processed from the geohash_str  argument also apply to ST_LongFromGeoHash() . 

ST_LongFromGeoHash()  handles its arguments as described in the introduction to this section. 

mysql> SELECT ST_LongFromGeoHash(ST_GeoHash(45,-20,10)); +-------------------------------------------+ | ST_LongFromGeoHash(ST_GeoHash(45,-20,10)) | +-------------------------------------------+ | 45 | +-------------------------------------------+ 

• ST_PointFromGeoHash( geohash_str , srid ) 

Returns a POINT  value containing the decoded geohash value, given a geohash string value. 

The X and Y coordinates of the point are the longitude in the range [ − 180, 180] and the latitude in the range [ − 90, 90], respectively. 

The srid  argument is an 32-bit unsigned integer. 

The remarks in the description of ST_LatFromGeoHash()  regarding the maximum number of characters processed from the geohash_str  argument also apply to ST_PointFromGeoHash() . 

ST_PointFromGeoHash()  handles its arguments as described in the introduction to this section. 

mysql> SET @gh = ST_GeoHash(45,-20,10); mysql> SELECT ST_AsText(ST_PointFromGeoHash(@gh,0)); +---------------------------------------+ | ST_AsText(ST_PointFromGeoHash(@gh,0)) | +---------------------------------------+ 

