PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum geography_out ( PG_FUNCTION_ARGS  )

Definition at line 177 of file geography_inout.c.

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_to_hexwkb(), and WKB_EXTENDED.

178 {
179  LWGEOM *lwgeom = NULL;
180  GSERIALIZED *g = NULL;
181  char *hexwkb;
182 
183  g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
184  lwgeom = lwgeom_from_gserialized(g);
185  hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, 0);
186  lwgeom_free(lwgeom);
187 
188  PG_RETURN_CSTRING(hexwkb);
189 }
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Definition: lwout_wkb.c:776
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
#define WKB_EXTENDED
Definition: liblwgeom.h:1769

Here is the call graph for this function: