文档

ST_PointFromGeoHash

更新时间:

从给定的GeoHash字符串中构造相应的Point对象。

语法

point  ST_PointFromGeoHash(text  geohash , integer  precision);

参数

参数名称

描述

geohash

Geohash字符串。

precision

精度。如果未指定精度,则ST_PointFromGeoHash返回基于输入GeoHash字符串的完全精度的点。

描述

该点表示GeoHash的中心点。

示例

  • 默认调用:

    SELECT ST_AsText(ST_PointFromGeoHash('wx47x9u8gumnhzp791zb'));
              st_astext
    -----------------------------
     POINT(116.00000000000007 39.999999999999936)
    (1 row)
  • 指定精度:

    SELECT ST_AsText(ST_PointFromGeoHash('wx47x9u8gumnhzp791zb',2));
           st_astext
    ------------------------
     POINT(118.125 42.1875)
    (1 row)
  • 本页导读 (1)