Share via


st_pointfromgeohash function

Applies to: check marked yes Databricks Runtime 17.1 and above

Important

This feature is in Public Preview.

Returns the center of the geohash grid box corresponding to the input geohash value as a 2D point geometry.

Syntax

st_pointfromgeohash ( geohash )

Arguments

  • geohash: A STRING value representing a geohash value.

Returns

A value of type GEOMETRY, representing the center point of the geohash grid box.

The SRID value of the returned point is 0.

See Wikipedia for more details on geohashes.

The function returns NULL if the input is NULL.

Examples

-- Returns the center point of the geohash grid box.
> SELECT st_astext(st_pointfromgeohash('9q8yyh'))
  POINT(-122.4261474609375 37.77374267578125)