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

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

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

550 {
551  GSERIALIZED *geom1;
552  GSERIALIZED *geom2;
553  GSERIALIZED *result;
554  LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
555 
556  geom1 = PG_GETARG_GSERIALIZED_P(0);
557  geom2 = PG_GETARG_GSERIALIZED_P(1);
558 
559  lwgeom1 = lwgeom_from_gserialized(geom1) ;
560  lwgeom2 = lwgeom_from_gserialized(geom2) ;
561 
562  lwresult = lwgeom_symdifference(lwgeom1, lwgeom2) ;
563  result = geometry_serialize(lwresult) ;
564 
565  lwgeom_free(lwgeom1) ;
566  lwgeom_free(lwgeom2) ;
567  lwgeom_free(lwresult) ;
568 
569  PG_FREE_IF_COPY(geom1, 0);
570  PG_FREE_IF_COPY(geom2, 1);
571 
572  PG_RETURN_POINTER(result);
573 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_symdifference(const LWGEOM *geom1, const LWGEOM *geom2)

Here is the call graph for this function: