public class FastNodingValidator extends Object
SegmentString
s is correctly noded.
Indexing is used to improve performance.
In the most common use case, validation stops after a single
non-noded intersection is detected,
but the class can be requested to detect all intersections
by using the setFindAllIntersections(boolean)
method.
The validator does not check for a-b-a topology collapse situations.
The validator does not check for endpoint-interior vertex intersections. This should not be a problem, since the JTS noders should be able to compute intersections between vertices correctly.
The client may either test the isValid()
condition,
or request that a suitable TopologyException
be thrown.
Constructor and Description |
---|
FastNodingValidator(Collection segStrings)
Creates a new noding validator for a given set of linework.
|
Modifier and Type | Method and Description |
---|---|
void |
checkValid()
Checks for an intersection and throws
a TopologyException if one is found.
|
String |
getErrorMessage()
Returns an error message indicating the segments containing
the intersection.
|
List |
getIntersections() |
boolean |
isValid()
Checks for an intersection and
reports if one is found.
|
void |
setFindAllIntersections(boolean findAllIntersections) |
public FastNodingValidator(Collection segStrings)
segStrings
- a collection of SegmentString
spublic void setFindAllIntersections(boolean findAllIntersections)
public List getIntersections()
public boolean isValid()
public String getErrorMessage()
public void checkValid()
TopologyException
- if an intersection is foundCopyright © 2015. All rights reserved.