- Categories:
ST_GEOMFROMGEOHASH¶
Returns a GEOMETRY object for the polygon that represents the boundaries of a geohash.
The number of characters in a geohash determines precision. Removing characters from the end of a geohash results in a geohash that is less precise and that identifies a larger rectangular area.
The optional precision argument specifies the precision to use for the input geohash. For example, passing 5
for precision specifies that the function uses the first 5 characters of the input geohash.
- See also:
Syntax¶
Arguments¶
Required:
geohashThe argument must be a geohash.
Optional:
precisionThe number of characters to use in the geohash. You can specify a value from
1to20.By default,
precisionis20, which produces a geohash that is 20 characters long.
Returns¶
Returns a value of type GEOMETRY.
Examples¶
The following example returns the GEOMETRY object for a geohash:
The following example returns the GEOMETRY object for a less precise geohash. The function uses the first 6 characters from the input geohash: