Converts a bigint value to a Geohash string. Use this function to reverse the output of ST_GeoHashID.
Syntax
cstring ST_GeoHashFromID(bigint value);Parameters
| Parameter | Description |
|---|---|
value | The integer value to convert. Pass the return value of ST_GeoHashID. |
Examples
The following example converts a geometry point to a Geohash string, encodes it as a bigint with ST_GeoHashID, and then decodes it back to a Geohash string with ST_GeoHashFromID.
SELECT ST_GeoHashFromID(
ST_GeoHashID(ST_GeoHash(
ST_GeomFromText('POINT(-115.172816 36.114646)'), 11)::cstring));Output:
9qqj7nmxncg