Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite - v 1.12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.operation.union
Class CascadedPolygonUnion

    java.lang.Object
      com.vividsolutions.jts.operation.union.CascadedPolygonUnion

    public class CascadedPolygonUnion

extends java.lang.Object

Provides an efficient method of unioning a collection of `Polygonal` geometrys. This algorithm is faster and likely more robust than the simple iterated approach of repeatedly unioning each polygon to a result geometry.

The `buffer(0)` trick is sometimes faster, but can be less robust and can sometimes take an exceptionally long time to complete. This is particularly the case where there is a high degree of overlap between the polygons. In this case, `buffer(0)` is forced to compute with all line segments from the outset, whereas cascading can eliminate many segments at each stage of processing. The best case for buffer(0) is the trivial case where there is no overlap between the input geometries. However, this case is likely rare in practice.

Author:
  Martin Davis

Constructor Summary
`CascadedPolygonUnion(java.util.Collection polys)` Creates a new instance to union the given collection of `Geometry`s.

Method Summary
`Geometry` | `union()` Computes the union of the input geometries.
`static Geometry` | `union(java.util.Collection polys)` Computes the union of a collection of `Polygonal` `Geometry`s.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CascadedPolygonUnion

    public CascadedPolygonUnion(java.util.Collection polys)

  Creates a new instance to union the given collection of `Geometry`s.

  Parameters:
    `geoms` - a collection of `Polygonal` `Geometry`s

Method Detail

### union

    public static Geometry union(java.util.Collection polys)

  Computes the union of a collection of `Polygonal` `Geometry`s.

  Parameters:
    `polys` - a collection of `Polygonal` `Geometry`s

### union

    public Geometry union()

  Computes the union of the input geometries.

  Returns:
    the union of the input geometries

Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite - v 1.12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD