com.vividsolutions.jts.operation
Class IsSimpleOp

java.lang.Object
  extended bycom.vividsolutions.jts.operation.IsSimpleOp

public class IsSimpleOp
extends java.lang.Object

Tests whether a Geometry is simple. In general, the SFS specification of simplicity follows the rule:

This definition relies on the definition of boundary points. The SFS uses the Mod-2 rule to determine which points are on the boundary of lineal geometries, but this class supports using other BoundaryNodeRules as well.

Simplicity is defined for each Geometry subclass as follows:

Version:
1.7
See Also:
BoundaryNodeRule

Constructor Summary
IsSimpleOp()
          Deprecated. use IsSimpleOp(Geometry)
IsSimpleOp(Geometry geom)
          Creates a simplicity checker using the default SFS Mod-2 Boundary Node Rule
IsSimpleOp(Geometry geom, BoundaryNodeRule boundaryNodeRule)
          Creates a simplicity checker using a given BoundaryNodeRule
 
Method Summary
 Coordinate getNonSimpleLocation()
          Gets a coordinate for the location where the geometry fails to be simple.
 boolean isSimple()
          Tests whether the geometry is simple.
 boolean isSimple(LineString geom)
          Deprecated. use isSimple()
 boolean isSimple(MultiLineString geom)
          Deprecated. use isSimple()
 boolean isSimple(MultiPoint mp)
          Deprecated. use isSimple()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsSimpleOp

public IsSimpleOp()
Deprecated. use IsSimpleOp(Geometry)

Creates a simplicity checker using the default SFS Mod-2 Boundary Node Rule


IsSimpleOp

public IsSimpleOp(Geometry geom)
Creates a simplicity checker using the default SFS Mod-2 Boundary Node Rule

Parameters:
geom - the geometry to test

IsSimpleOp

public IsSimpleOp(Geometry geom,
                  BoundaryNodeRule boundaryNodeRule)
Creates a simplicity checker using a given BoundaryNodeRule

Parameters:
geom - the geometry to test
boundaryNodeRule - the rule to use.
Method Detail

isSimple

public boolean isSimple()
Tests whether the geometry is simple.

Returns:
true if the geometry is simple

getNonSimpleLocation

public Coordinate getNonSimpleLocation()
Gets a coordinate for the location where the geometry fails to be simple. (i.e. where it has a non-boundary self-intersection). isSimple() must be called before this method is called.

Returns:
a coordinate for the location of the non-boundary self-intersection

isSimple

public boolean isSimple(LineString geom)
Deprecated. use isSimple()

Reports whether a LineString is simple.

Parameters:
geom - the lineal geometry to test
Returns:
true if the geometry is simple

isSimple

public boolean isSimple(MultiLineString geom)
Deprecated. use isSimple()

Reports whether a MultiLineString geometry is simple.

Parameters:
geom - the lineal geometry to test
Returns:
true if the geometry is simple

isSimple

public boolean isSimple(MultiPoint mp)
Deprecated. use isSimple()

A MultiPoint is simple iff it has no repeated points