PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ LWGEOM_out()

Datum LWGEOM_out ( PG_FUNCTION_ARGS  )

Definition at line 269 of file lwgeom_inout.c.

270 {
271  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
272  LWGEOM *lwgeom;
273  char *hexwkb;
274  size_t hexwkb_size;
275 
276  lwgeom = lwgeom_from_gserialized(geom);
277  hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &hexwkb_size);
278  lwgeom_free(lwgeom);
279 
280  PG_RETURN_CSTRING(hexwkb);
281 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define WKB_EXTENDED
Definition: liblwgeom.h:2068
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Definition: lwout_wkb.c:848

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

Here is the call graph for this function: