PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ LWGEOM_out()

Datum LWGEOM_out ( PG_FUNCTION_ARGS  )

Definition at line 244 of file lwgeom_inout.c.

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

Referenced by LWGEOM_to_latlon().

245 {
246  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
247  LWGEOM *lwgeom;
248  char *hexwkb;
249  size_t hexwkb_size;
250 
251  lwgeom = lwgeom_from_gserialized(geom);
252  hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &hexwkb_size);
253  lwgeom_free(lwgeom);
254 
255  PG_RETURN_CSTRING(hexwkb);
256 }
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Definition: lwout_wkb.c:834
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
#define WKB_EXTENDED
Definition: liblwgeom.h:1932
Here is the call graph for this function:
Here is the caller graph for this function: