symDifference method

Geometry symDifference(
  1. Geometry other
)

Computes a Geometry representing the closure of the point-set which is the union of the points in this Geometry which are not contained in the other Geometry, with the points in the other Geometry not contained in this Geometry. If the result is empty, it is an atomic geometry with the dimension of the highest input dimension.

Non-empty {@link GeometryCollection} arguments are not supported.

@param other the Geometry with which to compute the symmetric difference @return a Geometry representing the point-set symmetric difference of this Geometry with other @throws TopologyException if a robustness error occurs @throws IllegalArgumentException if either input is a non-empty GeometryCollection

Implementation

Geometry symDifference(Geometry other) {
  throw UnimplementedError("Not implemented yet"); // TODO
//    // handle empty geometry cases
//    if (this.isEmpty() || other.isEmpty()) {
//      // both empty - check dimensions
//      if (this.isEmpty() && other.isEmpty())
//        return OverlayOp.createEmptyResult(OverlayOp.SYMDIFFERENCE, this, other, factory);
//
//      // special case: if either input is empty ==> result = other arg
//      if (this.isEmpty()) return other.copy();
//      if (other.isEmpty()) return copy();
//    }
//
//    checkNotGeometryCollection(this);
//    checkNotGeometryCollection(other);
//    return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.SYMDIFFERENCE);
}