JTS Topology Suite version 1.12

com.vividsolutions.jts.operation.valid
Class IsValidOp

java.lang.Object
  extended by com.vividsolutions.jts.operation.valid.IsValidOp

public class IsValidOp
extends java.lang.Object

Implements the algorithms required to compute the isValid() method for Geometrys. See the documentation for the various geometry types for a specification of validity.

Version:
1.7

Constructor Summary
IsValidOp(Geometry parentGeometry)
           
 
Method Summary
static Coordinate findPtNotNode(Coordinate[] testCoords, LinearRing searchRing, GeometryGraph graph)
          Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords
 TopologyValidationError getValidationError()
           
 boolean isValid()
           
static boolean isValid(Coordinate coord)
          Checks whether a coordinate is valid for processing.
static boolean isValid(Geometry geom)
          Tests whether a Geometry is valid.
 void setSelfTouchingRingFormingHoleValid(boolean isValid)
          Sets whether polygons using Self-Touching Rings to form holes are reported as valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsValidOp

public IsValidOp(Geometry parentGeometry)
Method Detail

isValid

public static boolean isValid(Geometry geom)
Tests whether a Geometry is valid.

Parameters:
geom - the Geometry to test
Returns:
true if the geometry is valid

isValid

public static boolean isValid(Coordinate coord)
Checks whether a coordinate is valid for processing. Coordinates are valid iff their x and y ordinates are in the range of the floating point representation.

Parameters:
coord - the coordinate to validate
Returns:
true if the coordinate is valid

findPtNotNode

public static Coordinate findPtNotNode(Coordinate[] testCoords,
                                       LinearRing searchRing,
                                       GeometryGraph graph)
Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords

Returns:
the point found, or null if none found

setSelfTouchingRingFormingHoleValid

public void setSelfTouchingRingFormingHoleValid(boolean isValid)
Sets whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid:

The default (following the OGC SFS standard) is that this condition is not valid (false).

This does not affect whether Self-Touching Rings disconnecting the polygon interior are considered valid (these are considered to be invalid under the SFS, and many other spatial models as well). This includes "bow-tie" shells, which self-touch at a single point causing the interior to be disconnected, and "C-shaped" holes which self-touch at a single point causing an island to be formed.

Parameters:
isValid - states whether geometry with this condition is valid

isValid

public boolean isValid()

getValidationError

public TopologyValidationError getValidationError()

JTS Topology Suite version 1.12