union method

Geometry union()

Computes the union of all the elements of this geometry.

This method supports {@link GeometryCollection}s (which the other overlay operations currently do not).

The result obeys the following contract:

  • Unioning a set of {@link LineString}s has the effect of fully noding and dissolving the linework.
  • Unioning a set of {@link Polygon}s always returns a {@link Polygonal} geometry (unlike {@link #union(Geometry)}, which may return geometries of lower dimension if a topology collapse occurred).

@return the union geometry @throws TopologyException if a robustness error occurs

@see UnaryUnionOp

Implementation

Geometry union() {
  throw UnimplementedError("Not implemented yet"); // TODO
//    return UnaryUnionOp.union(this);
}