2688 char *geohash = NULL;
2689 text *result = NULL;
2691 if (PG_ARGISNULL(0))
2696 geom = PG_GETARG_GSERIALIZED_P(0);
2698 if (!PG_ARGISNULL(1))
2708 result = cstring_to_text(geohash);
2711 PG_RETURN_TEXT_P(result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
char * lwgeom_geohash(const LWGEOM *lwgeom, int precision)
Calculate the GeoHash (http://geohash.org) string for a geometry.