com.vividsolutions.jump.qa.diff
Class BufferGeometryMatcher
java.lang.Object
com.vividsolutions.jump.qa.diff.BufferGeometryMatcher
- All Implemented Interfaces:
- DiffGeometryMatcher
public class BufferGeometryMatcher
- extends java.lang.Object
- implements 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.
|
Method Summary |
com.vividsolutions.jts.geom.Geometry |
getQueryGeometry()
|
boolean |
isMatch(com.vividsolutions.jts.geom.Geometry geom)
|
static boolean |
isMatch(com.vividsolutions.jts.geom.Geometry g1,
com.vividsolutions.jts.geom.Geometry g2,
double tolerance)
Computes whether two geometries match under
this similarity test. |
static double |
maxOrthogonalDistance(com.vividsolutions.jts.geom.Envelope env1,
com.vividsolutions.jts.geom.Envelope env2)
|
void |
setQueryGeometry(com.vividsolutions.jts.geom.Geometry geom)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR_TOLERANCE
public static final double ERROR_TOLERANCE
- See Also:
- Constant Field Values
BufferGeometryMatcher
public BufferGeometryMatcher(double tolerance)
isMatch
public static boolean isMatch(com.vividsolutions.jts.geom.Geometry g1,
com.vividsolutions.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(com.vividsolutions.jts.geom.Envelope env1,
com.vividsolutions.jts.geom.Envelope env2)
setQueryGeometry
public void setQueryGeometry(com.vividsolutions.jts.geom.Geometry geom)
- Specified by:
setQueryGeometry in interface DiffGeometryMatcher
getQueryGeometry
public com.vividsolutions.jts.geom.Geometry getQueryGeometry()
- Specified by:
getQueryGeometry in interface DiffGeometryMatcher
isMatch
public boolean isMatch(com.vividsolutions.jts.geom.Geometry geom)
- Specified by:
isMatch in interface DiffGeometryMatcher