Class BufferGeometryMatcher
java.lang.Object
com.vividsolutions.jump.qa.diff.BufferGeometryMatcher
- All Implemented Interfaces:
DiffGeometryMatcher
Matches geometries based on whether each Geometry is contained in the
other's buffer. This is equivalent to each geometry being entirely
within the distance tolerance of the other.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.geom.GeometrybooleanisMatch(org.locationtech.jts.geom.Geometry geom) static booleanisMatch(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2, double tolerance) Computes whether two geometries match under this similarity test.static doublemaxOrthogonalDistance(org.locationtech.jts.geom.Envelope env1, org.locationtech.jts.geom.Envelope env2) voidsetQueryGeometry(org.locationtech.jts.geom.Geometry geom)
-
Field Details
-
ERROR_TOLERANCE
public static final double ERROR_TOLERANCE- See Also:
-
-
Constructor Details
-
BufferGeometryMatcher
public BufferGeometryMatcher(double tolerance)
-
-
Method Details
-
isMatch
public static boolean isMatch(org.locationtech.jts.geom.Geometry g1, org.locationtech.jts.geom.Geometry g2, double tolerance) Computes whether two geometries match under this similarity test. This is not the most efficient way of executing this predicate for multiple geometries.- Parameters:
g1- a Geometryg2- a Geometry- Returns:
- true if the geometries match under this comparison operation
-
maxOrthogonalDistance
public static double maxOrthogonalDistance(org.locationtech.jts.geom.Envelope env1, org.locationtech.jts.geom.Envelope env2) -
setQueryGeometry
public void setQueryGeometry(org.locationtech.jts.geom.Geometry geom) - Specified by:
setQueryGeometryin interfaceDiffGeometryMatcher
-
getQueryGeometry
public org.locationtech.jts.geom.Geometry getQueryGeometry()- Specified by:
getQueryGeometryin interfaceDiffGeometryMatcher
-
isMatch
public boolean isMatch(org.locationtech.jts.geom.Geometry geom) - Specified by:
isMatchin interfaceDiffGeometryMatcher
-