Categories:

Geospatial functions

ST_GEOMPOINTFROMGEOHASH

Returns a GEOMETRY object for the point that represents center of a geohash.

See also:

ST_GEOHASH, ST_GEOMFROMGEOHASH

语法

ST_GEOMPOINTFROMGEOHASH( <geohash> )

实参

geohash

实参必须是地理哈希。

返回

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

示例

以下示例为位于地理哈希中心的点返回 GEOMETRY 对象:

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