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

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

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

602 {
603  GSERIALIZED *geom1;
604  GSERIALIZED *geom2;
605  GSERIALIZED *result;
606  LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
607 
608  geom1 = PG_GETARG_GSERIALIZED_P(0);
609  geom2 = PG_GETARG_GSERIALIZED_P(1);
610 
611  lwgeom1 = lwgeom_from_gserialized(geom1) ;
612  lwgeom2 = lwgeom_from_gserialized(geom2) ;
613 
614  lwresult = lwgeom_symdifference(lwgeom1, lwgeom2) ;
615  result = geometry_serialize(lwresult) ;
616 
617  lwgeom_free(lwgeom1) ;
618  lwgeom_free(lwgeom2) ;
619  lwgeom_free(lwresult) ;
620 
621  PG_FREE_IF_COPY(geom1, 0);
622  PG_FREE_IF_COPY(geom2, 1);
623 
624  PG_RETURN_POINTER(result);
625 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_symdifference(const LWGEOM *geom1, const LWGEOM *geom2)

Here is the call graph for this function: