Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks Runtime 17.1 and above
Important
This feature is in Public Preview.
Returns the geohash grid box corresponding to the input geohash value as a 2D polygon geometry.
Syntax
st_geomfromgeohash ( geohash )
Arguments
geohash
: ASTRING
value representing a geohash value.
Returns
A value of type GEOMETRY
, representing the geohash grid box as a polygon.
The SRID value of the returned polygon is 0. The returned polygon is clockwise oriented.
See Wikipedia for more details on geohashes.
The function returns NULL
if the input is NULL
.
Examples
-- Returns the geohash grid box as a polygon.
> SELECT st_astext(st_geomfromgeohash('9q8yyh'))
POLYGON((-122.431640625 37.77099609375,-122.431640625 37.7764892578125,-122.420654296875 37.7764892578125,-122.420654296875 37.77099609375,-122.431640625 37.77099609375))