ST_SymDifference
Signatures
GEOMETRY ST_SymDifference(GEOMETRY geomA, GEOMETRY geomB);
Description
Computes the symmetric difference between geomA and geomB.
Note
Implements the OpenGIS Simple Features Implementation Specification for SQL version 1.2.1
Example
geomA Polygon |
geomB Polygon |
|---|---|
POLYGON((1 1, 7 1, 7 6, 1 6, 1 1)) |
POLYGON((3 2, 8 2, 8 8, 3 8, 3 2)) |
SELECT ST_SymDifference(geomA, geomB) FROM input_table;
-- Answer: MULTIPOLYGON(((1 1, 7 1, 7 2, 3 2, 3 6, 1 6, 1 1)),
-- ((7 2, 8 2, 8 8, 3 8, 3 6, 7 6, 7 2)))
