PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_SymDifference()

Datum ST_SymDifference ( PG_FUNCTION_ARGS  )

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

784{
785 GSERIALIZED *geom1;
786 GSERIALIZED *geom2;
788 LWGEOM *lwgeom1, *lwgeom2, *lwresult ;
789 double prec = -1;
790
791 geom1 = PG_GETARG_GSERIALIZED_P(0);
792 geom2 = PG_GETARG_GSERIALIZED_P(1);
793 if (PG_NARGS() > 2 && ! PG_ARGISNULL(2))
794 prec = PG_GETARG_FLOAT8(2);
795
796 lwgeom1 = lwgeom_from_gserialized(geom1) ;
797 lwgeom2 = lwgeom_from_gserialized(geom2) ;
798
799 lwresult = lwgeom_symdifference_prec(lwgeom1, lwgeom2, prec);
800 result = geometry_serialize(lwresult) ;
801
802 lwgeom_free(lwgeom1) ;
803 lwgeom_free(lwgeom2) ;
804 lwgeom_free(lwresult) ;
805
806 PG_FREE_IF_COPY(geom1, 0);
807 PG_FREE_IF_COPY(geom2, 1);
808
809 PG_RETURN_POINTER(result);
810}
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.
LWGEOM * lwgeom_symdifference_prec(const LWGEOM *geom1, const LWGEOM *geom2, double gridSize)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246

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: