Class BufferGeometryMatcher

java.lang.Object
com.vividsolutions.jump.qa.diff.BufferGeometryMatcher
All Implemented Interfaces:
DiffGeometryMatcher

public class BufferGeometryMatcher extends 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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferGeometryMatcher(double tolerance)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.locationtech.jts.geom.Geometry
     
    boolean
    isMatch(org.locationtech.jts.geom.Geometry geom)
     
    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.
    static double
    maxOrthogonalDistance(org.locationtech.jts.geom.Envelope env1, org.locationtech.jts.geom.Envelope env2)
     
    void
    setQueryGeometry(org.locationtech.jts.geom.Geometry geom)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 Geometry
      g2 - 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:
      setQueryGeometry in interface DiffGeometryMatcher
    • getQueryGeometry

      public org.locationtech.jts.geom.Geometry getQueryGeometry()
      Specified by:
      getQueryGeometry in interface DiffGeometryMatcher
    • isMatch

      public boolean isMatch(org.locationtech.jts.geom.Geometry geom)
      Specified by:
      isMatch in interface DiffGeometryMatcher