ST_PointFromGeoHash — 从GeoHash字符串返回点。
point
ST_PointFromGeoHash
(
text
geohash
, integer
precision=full_precision_of_geohash
)
;
从GeoHash字符串返回点。该点表示GeoHash的中心点。
如果没有
precision
指定ST_PointFromGeoHash将根据输入GeoHash字符串的全精度返回点。
如果
precision
则ST_PointFromGeoHash将使用GeoHash中的相同数量的字符来创建点。
可用性:2.1.0
SELECT ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0'));
st_astext
------------------------------
POINT(-115.172816 36.114646)
SELECT ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 4));
st_astext
-----------------------------------
POINT(-115.13671875 36.123046875)
SELECT ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 10));
st_astext
-------------------------------------------
POINT(-115.172815918922 36.1146435141563)