isWithinDistance static method

bool isWithinDistance(
  1. Geometry g1,
  2. Geometry g2,
  3. double distance
)

Tests whether the facets of two geometries lie within a given distance.

@param g1 a geometry @param g2 a geometry @param distance the distance limit @return true if two facets lie with the given distance

Implementation

static bool isWithinDistance(Geometry g1, Geometry g2, double distance) {
  IndexedFacetDistance dist = new IndexedFacetDistance(g1);
  return dist.isWithinDistanceGeometry(g2, distance);
}