ST_SymDifference
Determine the geometry that corresponds to the non-intersecting parts of the specified geometries.
Syntax
ST_SymDifference(geo1, geo2);
- geo1
- The first input geometry.
Type: VARCHAR(ANY)
- geo2
- The second input geometry.
Type: VARCHAR(ANY)
Returns
A value of type VARCHAR(ANY) that contains a geometry that represents the non-intersecting parts of the input geometries.
Examples
SELECT inza..ST_ASTEXT(inza..ST_SYMDIFFERENCE(inza..ST_WKTToSQL('POLYGON ((0 0, 11 0, 11 11,
0 11, 0 0))'), inza..ST_WKTToSQL('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))')));
ST_ASTEXT
-----------
MULTIPOLYGON (((11 10.5, 11 0, 0 0, 0 11, 10 11, 10 10, 11 10.5)), ((11 10.5, 11 11, 10
11, 10 20, 20 20, 20 15, 11 10.5)))
(1 row)