ST_Box2dFromGeoHash
Name
ST_Box2dFromGeoHash — Return a BOX2D from a GeoHash string.
Synopsis
box2d
ST_Box2dFromGeoHash
(
text
geohash
, integer
precision=full_precision_of_geohash
)
;
Description
Return a BOX2D from a GeoHash string.
If no
precision
is specified ST_Box2dFromGeoHash returns a BOX2D based on full precision of the input GeoHash string.
If
precision
is specified ST_Box2dFromGeoHash will use that many characters from the GeoHash to create the BOX2D. Lower precision values results in larger BOX2Ds and larger values increase the precision.
Availability: 2.1.0
Examples
SELECT ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0'); st_geomfromgeohash -------------------------------------------------- BOX(-115.172816 36.114646,-115.172816 36.114646) SELECT ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 0); st_box2dfromgeohash ---------------------- BOX(-180 -90,180 90) SELECT ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 10); st_box2dfromgeohash --------------------------------------------------------------------------- BOX(-115.17282128334 36.1146408319473,-115.172810554504 36.1146461963654)