org.openjump.core.geomutils.algorithm
Class PolygonMerge

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

public class PolygonMerge
extends java.lang.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 Summary
PolygonMerge(com.vividsolutions.jts.geom.Geometry poly1, com.vividsolutions.jts.geom.Geometry poly2)
           
 
Method Summary
 com.vividsolutions.jts.geom.Geometry getOutPolygon()
           
 int isMergeSuccesfull()
           
 boolean isPolys()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonMerge

public PolygonMerge(com.vividsolutions.jts.geom.Geometry poly1,
                    com.vividsolutions.jts.geom.Geometry poly2)
Method Detail

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 com.vividsolutions.jts.geom.Geometry getOutPolygon()
Returns:
Returns the outPolygon.

isPolys

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