public class CascadedPolygonUnion extends Object
Polygonal
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.
Constructor and Description |
---|
CascadedPolygonUnion(Collection polys)
Creates a new instance to union
the given collection of
Geometry s. |
CascadedPolygonUnion(Collection polys,
UnionStrategy unionFun)
Creates a new instance to union
the given collection of
Geometry s. |
Modifier and Type | Method and Description |
---|---|
Geometry |
union()
Computes the union of the input geometries.
|
static Geometry |
union(Collection polys)
|
static Geometry |
union(Collection polys,
UnionStrategy unionFun)
|
public CascadedPolygonUnion(Collection polys)
Geometry
s.public CascadedPolygonUnion(Collection polys, UnionStrategy unionFun)
Geometry
s.public static Geometry union(Collection polys)
public static Geometry union(Collection polys, UnionStrategy unionFun)
public Geometry union()
This method discards the input geometries as they are processed. In many input cases this reduces the memory retained as the operation proceeds. Optimal memory usage is achieved by disposing of the original input collection before calling this method.
IllegalStateException
- if this method is called more than onceCopyright © 2022. All rights reserved.