Class DistanceCalcEuclidean

java.lang.Object
com.graphhopper.util.DistanceCalcEarth
com.graphhopper.util.DistanceCalcEuclidean
All Implemented Interfaces:
DistanceCalc

public class DistanceCalcEuclidean extends DistanceCalcEarth
Calculates the distance of two points or one point and an edge in euclidean space.

Author:
Peter Karich
  • Field Summary

    Fields inherited from class com.graphhopper.util.DistanceCalcEarth

    C, DIST_EARTH, KM_MILE, METERS_PER_DEGREE, R, R_EQ
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    calcCircumference(double lat)
    Circumference of the earth at different latitudes (breitengrad)
    double
    calcDenormalizedDist(double normedDist)
    Inverse to calcNormalizedDist.
    double
    calcDist(double fromY, double fromX, double toY, double toX)
    Calculates distance of (from, to) in meter.
    double
    calcDist3D(double fromY, double fromX, double fromHeight, double toY, double toX, double toHeight)
    This implements a rather quick solution to calculate 3D distances on earth using euclidean geometry mixed with Haversine formula used for the on earth distance.
    double
    calcNormalizedDist(double dist)
    Returns the specified length in normalized meter.
    double
    calcNormalizedDist(double fromY, double fromX, double toY, double toX)
    Calculates in normalized meter
    double
    calcNormalizedEdgeDistance(double ry, double rx, double ay, double ax, double by, double bx)
    This method calculates the distance from r to edge (a, b) where the crossing point is c
    double
    calcNormalizedEdgeDistance3D(double ry, double rx, double rz, double ay, double ax, double az, double by, double bx, double bz)
    This method calculates the distance from r to edge (a, b) where the crossing point is c including elevation
    createBBox(double lat, double lon, double radiusInMeter)
     
    intermediatePoint(double f, double lat1, double lon1, double lat2, double lon2)
    This methods creates a point (lat, lon in degrees) a fraction of the distance along the path from (lat1, lon1) to (lat2, lon2).
    boolean
    isCrossBoundary(double lon1, double lon2)
     
    boolean
    isDateLineCrossOver(double lon1, double lon2)
     
    projectCoordinate(double latInDeg, double lonInDeg, double distanceInMeter, double headingClockwiseFromNorth)
    This methods creates a point (lat, lon in degrees) in a certain distance and direction from the specified point (lat, lon in degrees).
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DistanceCalcEuclidean

      public DistanceCalcEuclidean()
  • Method Details