symmetricDifference
Computes the symmetric difference of geometry a
with geometry b
.
The result is a geometry that contains all points that are in either
geometry but not in both geometries (the union minus the intersection).
Parameters
Name | Type | Description |
---|---|---|
a | Geometry | First geometry |
b | Geometry | Second geometry |
options? | object | Optional options object |
options.gridSize? | number | Precision grid cell size for snapping vertices. If 0 or when not defined, the highest precision is used (IEE754 double), which provides almost 16 decimal digits of precision. If nonzero, input as well as resulting coordinates will be snapped to a precision grid of that size. |
Returns
Geometry
A new geometry representing the symmetric difference
Examples
symmetric difference of two lines