PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_SymDifference()

Datum ST_SymDifference ( PG_FUNCTION_ARGS  )

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

729 {
730  GSERIALIZED *geom1;
731  GSERIALIZED *geom2;
733  LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
734  double prec = -1;
735 
736  geom1 = PG_GETARG_GSERIALIZED_P(0);
737  geom2 = PG_GETARG_GSERIALIZED_P(1);
738  if (PG_NARGS() > 2 && ! PG_ARGISNULL(2))
739  prec = PG_GETARG_FLOAT8(2);
740 
741  lwgeom1 = lwgeom_from_gserialized(geom1) ;
742  lwgeom2 = lwgeom_from_gserialized(geom2) ;
743 
744  lwresult = lwgeom_symdifference_prec(lwgeom1, lwgeom2, prec);
745  result = geometry_serialize(lwresult) ;
746 
747  lwgeom_free(lwgeom1) ;
748  lwgeom_free(lwgeom2) ;
749  lwgeom_free(lwresult) ;
750 
751  PG_FREE_IF_COPY(geom1, 0);
752  PG_FREE_IF_COPY(geom2, 1);
753 
754  PG_RETURN_POINTER(result);
755 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
LWGEOM * lwgeom_symdifference_prec(const LWGEOM *geom1, const LWGEOM *geom2, double gridSize)

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_symdifference_prec(), and result.

Referenced by symdifference().

Here is the call graph for this function:
Here is the caller graph for this function: