PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ geography_out()

Datum geography_out ( PG_FUNCTION_ARGS  )

Definition at line 190 of file geography_inout.c.

191 {
192  LWGEOM *lwgeom = NULL;
193  GSERIALIZED *g = NULL;
194  char *hexwkb;
195 
196  g = PG_GETARG_GSERIALIZED_P(0);
197  lwgeom = lwgeom_from_gserialized(g);
198  hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, 0);
199  lwgeom_free(lwgeom);
200 
201  PG_RETURN_CSTRING(hexwkb);
202 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
#define WKB_EXTENDED
Definition: liblwgeom.h:2123
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Definition: lwout_wkb.c:874

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

Here is the call graph for this function: