unaryUnion
Computes the (self) union of all components of geometry a.
This is particularly useful for reducing MultiGeometries or
GeometryCollections into their minimal representation, merging
overlapping elements and removing duplicates.
Parameters
| Name | Type | Description |
|---|---|---|
a | Geometry | 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 union of all components
Examples
dissolving overlapping polygons in a MultiPolygon
should remove duplicated points