Class PolygonMerge

java.lang.Object
org.openjump.core.geomutils.algorithm.PolygonMerge

public class PolygonMerge extends Object
Merges two polygon and returns the result via getOutPolygon() if the result is not of another geometry type. The merge is done with the JTS union() method.
Author:
sstein
  • Constructor Details

    • PolygonMerge

      public PolygonMerge(org.locationtech.jts.geom.Geometry poly1, org.locationtech.jts.geom.Geometry poly2)
  • Method Details

    • isMergeSuccesfull

      public int isMergeSuccesfull()
      Returns:
      Returns the mergeSuccesfull.

      0: polys dont touch, 1: sucessfull, 2: polys touch but only with one point on line. thus a multipolygon is created.

    • getOutPolygon

      public org.locationtech.jts.geom.Geometry getOutPolygon()
      Returns:
      Returns the outPolygon.
    • isPolys

      public boolean isPolys()
      Returns:
      Returns if both are polys.