Class BufferResultMatcher
java.lang.Object
org.locationtech.jtstest.testrunner.BufferResultMatcher
- All Implemented Interfaces:
ResultMatcher
A
ResultMatcher which compares the results of
buffer operations for equality, up to the given tolerance.
All other operations are delagated to the
standard EqualityResultMatcher algorithm.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResultMatcherprivate static final doubleprivate static final doubleprivate static final doubleThe minimum distance tolerance which will be used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBoundaryHausdorffDistanceInTolerance(Geometry actualBuffer, Geometry expectedBuffer, double distance) booleanisBufferResultMatch(Geometry actualBuffer, Geometry expectedBuffer, double distance) booleanisMatch(Geometry geom, String opName, Object[] args, Result actualResult, Result expectedResult, double tolerance) Tests whether the two results are equal within the given tolerance.booleanisSymDiffAreaInTolerance(Geometry actualBuffer, Geometry expectedBuffer)
-
Field Details
-
defaultMatcher
-
MAX_RELATIVE_AREA_DIFFERENCE
private static final double MAX_RELATIVE_AREA_DIFFERENCE- See Also:
-
MAX_HAUSDORFF_DISTANCE_FACTOR
private static final double MAX_HAUSDORFF_DISTANCE_FACTOR- See Also:
-
MIN_DISTANCE_TOLERANCE
private static final double MIN_DISTANCE_TOLERANCEThe minimum distance tolerance which will be used. This is required because densified vertices do no lie precisely on their parent segment.- See Also:
-
-
Constructor Details
-
BufferResultMatcher
public BufferResultMatcher()
-
-
Method Details
-
isMatch
public boolean isMatch(Geometry geom, String opName, Object[] args, Result actualResult, Result expectedResult, double tolerance) Tests whether the two results are equal within the given tolerance. The input parameters are not considered.- Specified by:
isMatchin interfaceResultMatcher- Parameters:
geom- the target geometryopName- the operation performedargs- the input arguments to the operationactualResult- the actual computed resultexpectedResult- the expected result of the testtolerance- the tolerance for the test- Returns:
- true if the actual and expected results are considered equal
-
isBufferResultMatch
-
isSymDiffAreaInTolerance
-
isBoundaryHausdorffDistanceInTolerance
-