2673 char *geohash = NULL;
2674 text *result = NULL;
2676 if ( PG_ARGISNULL(0) )
2681 geom = PG_GETARG_GSERIALIZED_P(0);
2683 if ( ! PG_ARGISNULL(1) )
2693 result = cstring_to_text(geohash);
2696 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.