@Test public void testDistance() { final double distance1 = GeometryHullTool.calcDistance( new Coordinate(3, 3), new Coordinate(6, 6), new Coordinate(5, 5.5)); final double distance2 = GeometryHullTool.calcDistance( new Coordinate(3, 3), new Coordinate(6, 6), new Coordinate(5, 4.5)); assertEquals(distance1, distance2, 0.0001); final double distance3 = GeometryHullTool.calcDistance( new Coordinate(4, 6), new Coordinate(6, 12), new Coordinate(5, 8)); assertTrue(distance3 > 0); final double distance4 = GeometryHullTool.calcDistance( new Coordinate(4, 6), new Coordinate(6, 12), new Coordinate(5, 9)); assertEquals(0.0, distance4, 0.001); final double distance5 = GeometryHullTool.calcDistance( new Coordinate(5, 7), new Coordinate(11, 3), new Coordinate(6, 10)); assertTrue(distance5 < 0); final double distance6 = GeometryHullTool.calcDistance( new Coordinate(5, 7), new Coordinate(11, 3), new Coordinate(7, 6.5)); final double distance7 = GeometryHullTool.calcDistance( new Coordinate(5, 7), new Coordinate(11, 3), new Coordinate(7, 5.0)); assertTrue(distance7 < distance6); }
public static double calcDistance( final Coordinate start, final Coordinate end, final Coordinate point) { final double[] p = calcDistanceSegment(start, end, point); return ((p[0] < 0.0) || (p[0] > 1.0)) ? -1 : p[1]; }
GeometryHullTool { public static double calcDistance( final Coordinate start, final Coordinate end, final Coordinate point) { final double[] p = calcDistanceSegment(start, end, point); return ((p[0] < 0.0) || (p[0] > 1.0)) ? -1 : p[1]; } }
GeometryHullTool { public static double calcDistance( final Coordinate start, final Coordinate end, final Coordinate point) { final double[] p = calcDistanceSegment(start, end, point); return ((p[0] < 0.0) || (p[0] > 1.0)) ? -1 : p[1]; }  }
GeometryHullTool { public static double calcDistance( final Coordinate start, final Coordinate end, final Coordinate point) { final double[] p = calcDistanceSegment(start, end, point); return ((p[0] < 0.0) || (p[0] > 1.0)) ? -1 : p[1]; }  void connect(final List<Geometry> geometries); DistanceFn<Coordinate> getDistanceFnForCoordinate(); void setDistanceFnForCoordinate(final DistanceFn<Coordinate> distanceFnForCoordinate); Geometry createHullFromGeometry(
      final Geometry clusterGeometry,
      final Collection<Coordinate> additionalPoints,
      final boolean fast); Geometry concaveHullParkOhMethod(
      final Geometry geometry,
      final Collection<Coordinate> providedInnerPoints); Geometry concaveHull(
      final Geometry geometry,
      final Collection<Coordinate> providedInnerPoints); static boolean intersectAnotherEdge(final Edge newEdge, final Edge edgeToReplace); static boolean edgesIntersect(final Edge e1, final Edge e2); Geometry connect(final Geometry shape1, final Geometry shape2); static boolean clockwise(final Coordinate[] set); static double calcSmallestAngle(
      final Coordinate one,
      final Coordinate vertex,
      final Coordinate two); static double calcAngle(
      final Coordinate one,
      final Coordinate vertex,
      final Coordinate two); static double[] calcDistanceSegment(
      final Coordinate start,
      final Coordinate end,
      final Coordinate point); static double calcDistance(
      final Coordinate start,
      final Coordinate end,
      final Coordinate point); static Pair<Integer, Integer> getClosestPoints(
      final Geometry shape1,
      final Geometry shape2,
      final DistanceFn<Coordinate> distanceFnForCoordinate); }
GeometryHullTool { public static double calcDistance( final Coordinate start, final Coordinate end, final Coordinate point) { final double[] p = calcDistanceSegment(start, end, point); return ((p[0] < 0.0) || (p[0] > 1.0)) ? -1 : p[1]; }  void connect(final List<Geometry> geometries); DistanceFn<Coordinate> getDistanceFnForCoordinate(); void setDistanceFnForCoordinate(final DistanceFn<Coordinate> distanceFnForCoordinate); Geometry createHullFromGeometry(
      final Geometry clusterGeometry,
      final Collection<Coordinate> additionalPoints,
      final boolean fast); Geometry concaveHullParkOhMethod(
      final Geometry geometry,
      final Collection<Coordinate> providedInnerPoints); Geometry concaveHull(
      final Geometry geometry,
      final Collection<Coordinate> providedInnerPoints); static boolean intersectAnotherEdge(final Edge newEdge, final Edge edgeToReplace); static boolean edgesIntersect(final Edge e1, final Edge e2); Geometry connect(final Geometry shape1, final Geometry shape2); static boolean clockwise(final Coordinate[] set); static double calcSmallestAngle(
      final Coordinate one,
      final Coordinate vertex,
      final Coordinate two); static double calcAngle(
      final Coordinate one,
      final Coordinate vertex,
      final Coordinate two); static double[] calcDistanceSegment(
      final Coordinate start,
      final Coordinate end,
      final Coordinate point); static double calcDistance(
      final Coordinate start,
      final Coordinate end,
      final Coordinate point); static Pair<Integer, Integer> getClosestPoints(
      final Geometry shape1,
      final Geometry shape2,
      final DistanceFn<Coordinate> distanceFnForCoordinate);  }