PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ geography_out()

Datum geography_out ( PG_FUNCTION_ARGS  )

Definition at line 191 of file geography_inout.c.

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

Referenced by geography_in().

192 {
193  LWGEOM *lwgeom = NULL;
194  GSERIALIZED *g = NULL;
195  char *hexwkb;
196 
197  g = PG_GETARG_GSERIALIZED_P(0);
198  lwgeom = lwgeom_from_gserialized(g);
199  hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, 0);
200  lwgeom_free(lwgeom);
201 
202  PG_RETURN_CSTRING(hexwkb);
203 }
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Definition: lwout_wkb.c:848
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
#define WKB_EXTENDED
Definition: liblwgeom.h:2076
Here is the call graph for this function:
Here is the caller graph for this function: