code: public static Double getDistanceBetweenCoordinates(Tuple2<Double, Double> point1, Tuple2<Double, Double> point2) {
          // sqrt( (x2-x1)^2 + (y2-y2)^2 )
          Double xDiff = point1._1() - point2._1();
          Double yDiff = point1._2() - point2._2();
          return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
      }
docs: Get distance between geographical coordinates
  @param point1 Point1
  @param point2 Point2
  @return Distance (double)