PostGIS
Synopsis
point +`*`+ST_PointFromGeoHash
*(`text `geohash
, integer
precision=full_precision_of_geohash`
)`;
Description
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
Examples
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)