Categories:

Geospatial functions

ST_GEOMPOINTFROMGEOHASH

Returns a GEOMETRY object for the point that represents center of a geohash (link removed).

See also:

ST_GEOHASH, ST_GEOMFROMGEOHASH

Syntax

ST_GEOMPOINTFROMGEOHASH( <geohash> )
Copy

Arguments

geohash

The argument must be a geohash.

Returns

Returns a value of type GEOMETRY that represents the point that is the center of the geohash.

Examples

The following example returns the GEOMETRY object for the point at the center of a geohash:

SELECT ST_GEOMPOINTFROMGEOHASH('9q9j8ue2v71y5zzy0s4q')
  AS geometry_center_point_of_geohash;
Copy
+----------------------------------+
| GEOMETRY_CENTER_POINT_OF_GEOHASH |
|----------------------------------|
| {                                |
|   "coordinates": [               |
|     -1.223061000000001e+02,      |
|     3.755416199999996e+01        |
|   ],                             |
|   "type": "Point"                |
| }                                |
+----------------------------------+
Language: English