名前

ST_PointFromGeoHash — GeoHash文字列からポイントを返します。

概要

point ST_PointFromGeoHash(text geohash, integer precision=full_precision_of_geohash);

説明

GeoHash文字列からポイントを返します。ポイントはGeoHashの中心点を表します。

precisionを指定しない場合には、ST_PointFromGeoHashは、入力GeoHash文字列の最大精度に基づくポイントを返します。

precisionを指定した場合には、ST_PointFromGeoHashは、ポイント生成のために、GeoHasoから多数の文字を使用します。

Availability: 2.1.0

Code
SELECT ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0');
出力:
POINT(-115.172816 36.114646)
Figure
Geometry figure for visual-st-pointfromgeohash-01
Code
SELECT ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 4);
出力:
POINT(-115.13671875 36.123046875)
Figure
Geometry figure for visual-st-pointfromgeohash-02
Code
SELECT ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 10);
出力:
POINT(-115.172815918922 36.1146435141563)
Figure
Geometry figure for visual-st-pointfromgeohash-03