Class CascadedPolygonUnion
Provides an efficient method of unioning a collection of IPolygonal geometries. The geometries are indexed using a spatial index, and unioned recursively in index order. For geometries with a high degree of overlap, this has the effect of reducing the number of vertices early in the process, which increases speed and robustness.
This algorithm is faster and more robust than the simple iterated approach of repeatedly unioning each polygon to a result geometry.
Inherited Members
Namespace: NetTopologySuite.Operation.Union
Assembly: NetTopologySuite.dll
Syntax
public class CascadedPolygonUnion
Constructors
| Improve this Doc View SourceCascadedPolygonUnion(ICollection<Geometry>)
Creates a new instance to union the given collection of Geometrys.
Declaration
public CascadedPolygonUnion(ICollection<Geometry> polys)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Geometry> | polys | A collection of IPolygonal Geometrys |
CascadedPolygonUnion(ICollection<Geometry>, UnionStrategy)
Creates a new instance to union the given collection of Geometrys.
Declaration
public CascadedPolygonUnion(ICollection<Geometry> polys, UnionStrategy unionStrategy)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Geometry> | polys | A collection of IPolygonal Geometrys |
UnionStrategy | unionStrategy |
Methods
| Improve this Doc View SourceUnion()
Computes the union of the input geometries.
Declaration
public Geometry Union()
Returns
Type | Description |
---|---|
Geometry | null if no input geometries were provided
|
Exceptions
Type | Condition |
---|---|
InvalidOperationException | if this method is called more than once |
Union(ICollection<Geometry>)
Computes the union of a collection of Geometrys.
Declaration
public static Geometry Union(ICollection<Geometry> polys)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Geometry> | polys | A collection of IPolygonal Geometrys. |
Returns
Type | Description |
---|---|
Geometry | The union of the |
Union(ICollection<Geometry>, UnionStrategy)
Computes the union of a collection of Geometrys.
Declaration
public static Geometry Union(ICollection<Geometry> polys, UnionStrategy unionStrategy)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Geometry> | polys | A collection of IPolygonal Geometrys. |
UnionStrategy | unionStrategy | A strategy to perform the unioning. |
Returns
Type | Description |
---|---|
Geometry | The union of the |