Example #1
0
 /// <summary>
 /// Test whether two geometries lie within a given distance of each other.
 /// </summary>
 /// <param name="g0"></param>
 /// <param name="g1"></param>
 /// <param name="distance"></param>
 /// <returns></returns>
 public static bool IsWithinDistance(IGeometry g0, IGeometry g1, double distance)
 {
     DistanceOp distOp = new DistanceOp(g0, g1, distance);
     return distOp.Distance() <= distance;
 }
Example #2
0
 /// <summary>
 /// Compute the the closest points of two geometries.
 /// The points are presented in the same order as the input Geometries.
 /// </summary>
 /// <param name="g0">A <c>Geometry</c>.</param>
 /// <param name="g1">Another <c>Geometry</c>.</param>
 /// <returns>The closest points in the geometries.</returns>
 public static Coordinate[] ClosestPoints(IGeometry g0, IGeometry g1)
 {
     DistanceOp distOp = new DistanceOp(g0, g1);
     return distOp.ClosestPoints();
 }
Example #3
0
 /// <summary>
 /// Compute the distance between the closest points of two geometries.
 /// </summary>
 /// <param name="g0">A <c>Geometry</c>.</param>
 /// <param name="g1">Another <c>Geometry</c>.</param>
 /// <returns>The distance between the geometries.</returns>
 public static double Distance(IGeometry g0, IGeometry g1)
 {
     DistanceOp distOp = new DistanceOp(g0, g1);
     return distOp.Distance();
 }