PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_SymDifference()

Datum ST_SymDifference ( PG_FUNCTION_ARGS  )

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

846 {
847  GSERIALIZED *geom1;
848  GSERIALIZED *geom2;
850  LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
851  double prec = -1;
852 
853  geom1 = PG_GETARG_GSERIALIZED_P(0);
854  geom2 = PG_GETARG_GSERIALIZED_P(1);
855  if (PG_NARGS() > 2 && ! PG_ARGISNULL(2))
856  prec = PG_GETARG_FLOAT8(2);
857 
858  lwgeom1 = lwgeom_from_gserialized(geom1) ;
859  lwgeom2 = lwgeom_from_gserialized(geom2) ;
860 
861  lwresult = lwgeom_symdifference_prec(lwgeom1, lwgeom2, prec);
862  result = geometry_serialize(lwresult) ;
863 
864  lwgeom_free(lwgeom1) ;
865  lwgeom_free(lwgeom2) ;
866  lwgeom_free(lwresult) ;
867 
868  PG_FREE_IF_COPY(geom1, 0);
869  PG_FREE_IF_COPY(geom2, 1);
870 
871  PG_RETURN_POINTER(result);
872 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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: