Class OverlayResultValidator
java.lang.Object
org.locationtech.jts.operation.overlay.validate.OverlayResultValidator
Validates that the result of an overlay operation is
geometrically correct, within a determined tolerance.
Uses fuzzy point location to find points which are
definitely in either the interior or exterior of the result
geometry, and compares these results with the expected ones.
This algorithm is only useful where the inputs are polygonal. This is a heuristic test, and may return false positive results (I.e. it may fail to detect an invalid result.) It should never return a false negative result, however (I.e. it should never report a valid result as invalid.)
- Version:
- 1.7
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
private Geometry[]
private Coordinate
private int[]
private FuzzyPointLocator[]
private List
private static final double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private boolean
checkValid
(int overlayOp) private boolean
checkValid
(int overlayOp, Coordinate pt) private static double
private static boolean
hasLocation
(int[] location, int loc) boolean
isValid
(int overlayOp) static boolean
private boolean
isValidResult
(int overlayOp, int[] location) private void
reportResult
(int overlayOp, int[] location, boolean expectedInterior)
-
Field Details
-
TOLERANCE
private static final double TOLERANCE- See Also:
-
geom
-
locFinder
-
location
private int[] location -
invalidLocation
-
boundaryDistanceTolerance
private double boundaryDistanceTolerance -
testCoords
-
-
Constructor Details
-
OverlayResultValidator
-
-
Method Details
-
isValid
-
computeBoundaryDistanceTolerance
-
isValid
public boolean isValid(int overlayOp) -
getInvalidLocation
-
addTestPts
-
checkValid
private boolean checkValid(int overlayOp) -
checkValid
-
hasLocation
private static boolean hasLocation(int[] location, int loc) -
isValidResult
private boolean isValidResult(int overlayOp, int[] location) -
reportResult
private void reportResult(int overlayOp, int[] location, boolean expectedInterior)
-