new IsValidOp()
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
 Source:
Methods
(static) findPtNotNode()
Find a point from the list of testCoords that is NOT a node in the edge for
the list of searchCoords
 Source:
Returns:
the point found, or
null
if none found.
(static) isValid(geom)
Tests whether a Geometry is valid.
Parameters:
Name  Type  Description 

geom 
the Geometry to test. 
 Source:
Returns:
true if the geometry is valid.
checkConsistentArea(graph)
Checks that the arrangement of edges in a polygonal geometry graph forms a
consistent area.
Parameters:
Name  Type  Description 

graph 
 Source:
 See:

 ConsistentAreaTester
checkHolesInShell(p, graph)
Tests that each hole is inside the polygon shell. This routine assumes that
the holes have previously been tested to ensure that all vertices lie on the
shell oon the same side of it (i.e that the hole rings do not cross the shell
ring). In other words, this test is only correct if the ConsistentArea test
is passed first. Given this, a simple pointinpolygon test of a single point
in the hole can be used, provided the point is chosen such that it does not
lie on the shell.
Parameters:
Name  Type  Description 

p 
the polygon to be tested for hole inclusion.  
graph 
a GeometryGraph incorporating the polygon. 
checkHolesNotNested()
Tests that no hole is nested inside another hole. This routine assumes that
the holes are disjoint. To ensure this, holes have previously been tested to
ensure that:
 they do not partially overlap (checked by
checkRelateConsistency
)  they are not identical (checked by
checkRelateConsistency
)
checkNoSelfIntersectingRing()
Check that a ring does not selfintersect, except at its endpoints. Algorithm
is to count the number of times each node along edge occurs. If any occur
more than once, that must be a selfintersection.
checkNoSelfIntersectingRings(graph)
Check that there is no ring which selfintersects (except of course at its
endpoints). This is required by OGC topology rules (but not by other models
such as ESRI SDE, which allow inverted shells and exverted holes).
Parameters:
Name  Type  Description 

graph 
the topology graph of the geometry. 
checkShellInsideHole()
This routine checks to see if a shell is properly contained in a hole. It
assumes that the edges of the shell and hole do not properly intersect.
Returns:
null
if the shell is properly contained, or a
Coordinate which is not inside the hole if it is not.
checkShellNotNested()
Check if a shell is incorrectly nested within a polygon. This is the case if
the shell is inside the polygon shell, but not inside a polygon hole. (If the
shell is inside a polygon hole, the nesting is valid.)
The algorithm used relies on the fact that the rings must be properly
contained. E.g. they cannot partially overlap (this has been previously
checked by checkRelateConsistency
)
checkShellsNotNested()
Tests that no element polygon is wholly in the interior of another element
polygon.
Preconditions:
 shells do not partially overlap
 shells do not touch along an edge
 no duplicate rings exist
checkValidLinearRing()
Checks validity of a LinearRing.
checkValidLineString()
Checks validity of a LineString. Almost anything goes for linestrings!
checkValidMultiPoint()
Checks validity of a MultiPoint.
checkValidPoint()
Checks validity of a Point.
checkValidPolygon()
Checks the validity of a polygon. Sets the validErr flag.
setSelfTouchingRingFormingHoleValid(isValid)
Sets whether polygons using SelfTouching Rings to form holes are
reported as valid. If this flag is set, the following SelfTouching
conditions are treated as being valid:
 the shell ring selftouches to create a hole touching the shell
 a hole ring selftouches to create two holes touching at a point
The default (following the OGC SFS standard) is that this condition is not
valid (false
).
This does not affect whether SelfTouching 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 "bowtie" shells, which selftouch at a single point causing the interior to be disconnected, and "Cshaped" holes which selftouch at a single point causing an island to be formed.
Parameters:
Name  Type  Description 

isValid 
states whether geometry with this condition is valid. 
 Source: