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

Definition at line 872 of file postgis/lwgeom_geos.c.

References geometry_serialize(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_symdifference(), and result.

873 {
874  GSERIALIZED *geom1;
875  GSERIALIZED *geom2;
877  LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
878 
879  geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
880  geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
881 
882  lwgeom1 = lwgeom_from_gserialized(geom1) ;
883  lwgeom2 = lwgeom_from_gserialized(geom2) ;
884 
885  lwresult = lwgeom_symdifference(lwgeom1, lwgeom2) ;
886  result = geometry_serialize(lwresult) ;
887 
888  lwgeom_free(lwgeom1) ;
889  lwgeom_free(lwgeom2) ;
890  lwgeom_free(lwresult) ;
891 
892  PG_FREE_IF_COPY(geom1, 0);
893  PG_FREE_IF_COPY(geom2, 1);
894 
895  PG_RETURN_POINTER(result);
896 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
char ** result
Definition: liblwgeom.h:218
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_symdifference(const LWGEOM *geom1, const LWGEOM *geom2)

Here is the call graph for this function: