Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

public class UnaryUnionOp
extends java.lang.Object

Unions a collection of Geometry or a single Geometry (which may be a collection) together. By using this special-purpose operation over a collection of geometries it is possible to take advantage of various optimizations to improve performance. Heterogeneous `GeometryCollection`s are fully supported.

The result obeys the following contract:

- Unioning a set of overlapping `Polygons`s has the effect of merging the areas (i.e. the same effect as iteratively unioning all individual polygons together).
- Unioning a set of `LineString`s has the effect of fully noding and dissolving the input linework. In this context "fully noded" means that there will be a node or endpoint in the output for every endpoint or line segment crossing in the input. "Dissolved" means that any duplicate (e.g. coincident) line segments or portions of line segments will be reduced to a single line segment in the output. This is consistent with the semantics of the `Geometry.union(Geometry)` operation. If merged linework is required, the `LineMerger` class can be used.
- Unioning a set of `Points`s has the effect of merging al identical points (producing a set with no duplicates).

Author:
  mbdavis

Constructor Summary
`UnaryUnionOp(java.util.Collection geoms)`
`UnaryUnionOp(java.util.Collection geoms, GeometryFactory geomFact)`
`UnaryUnionOp(Geometry geom)`

Method Summary
`Geometry` | `union()` Gets the union of the input geometries.
`static Geometry` | `union(java.util.Collection geoms)`
`static Geometry` | `union(java.util.Collection geoms, GeometryFactory geomFact)`
`static Geometry` | `union(Geometry geom)`

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

Constructor Detail

### UnaryUnionOp

    public UnaryUnionOp(java.util.Collection geoms,
                        GeometryFactory geomFact)

### UnaryUnionOp

    public UnaryUnionOp(java.util.Collection geoms)

### UnaryUnionOp

    public UnaryUnionOp(Geometry geom)

Method Detail

### union

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

### union

    public static Geometry union(java.util.Collection geoms,
                                 GeometryFactory geomFact)

### union

    public static Geometry union(Geometry geom)

### union

    public Geometry union()

  Gets the union of the input geometries. If no input geometries were provided, a POINT EMPTY is returned.

  Returns:
    a Geometry containing the union

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD