/// <summary> /// Test whether two geometries lie within a given distance of /// each other. /// </summary> /// <param name="g0">a <see cref="Geometry"/> /// </param> /// <param name="g1">another <see cref="Geometry"/> /// </param> /// <param name="distance">the distance to test /// </param> /// <returns> true if g0.distance(g1) <= distance /// </returns> public static bool IsWithinDistance(Geometry g0, Geometry g1, double distance) { DistanceOp distOp = new DistanceOp(g0, g1, distance); return(distOp.Distance() <= distance); }
/// <summary> /// Compute the Distance between the closest points of two geometries. /// </summary> /// <param name="g0">a Geometry /// </param> /// <param name="g1">another Geometry /// </param> /// <returns> the Distance between the geometries /// </returns> public static double Distance(Geometry g0, Geometry g1) { DistanceOp distOp = new DistanceOp(g0, g1); return(distOp.Distance()); }