/// <summary> /// Determines if the multipoint is within the specified distance from the other multipoint. /// </summary> /// <param name="multipoint1"></param> /// <param name="multipoint2"></param> /// <param name="distance"></param> /// <returns></returns> public static bool WithinDistance(this Multipoint multipoint1, Multipoint multipoint2, double distance) { if (Null(multipoint1, multipoint2)) return false; return multipoint1.Extent().Buffer(distance).Intersects(multipoint2.Extent()) && multipoint1.Distance(multipoint2) < distance; }
/// <summary> /// Determines if the point is within the specified distance from the multipoint. /// </summary> /// <param name="point"></param> /// <param name="multipoint"></param> /// <param name="distance"></param> /// <returns></returns> public static bool WithinDistance(this Point point, Multipoint multipoint, double distance) { if (Null(point, multipoint)) return false; return point.Extent().Buffer(distance).Intersects(multipoint.Extent()) && point.Distance(multipoint) < distance; }