დასახელება

ST_PointFromGeoHash — Return a point from a GeoHash string.

სინოპსისი

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

აღწერა

Return a point from a GeoHash string. The point represents the center point of the GeoHash.

If no precision is specified ST_PointFromGeoHash returns a point based on full precision of the input GeoHash string.

If precision is specified ST_PointFromGeoHash will use that many characters from the GeoHash to create the point.

Availability: 2.1.0

მაგალითები

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

ასევე იხილეთ

ST_GeoHash, ST_Box2dFromGeoHash, ST_GeomFromGeoHash