public class DistanceCalcEuclidean extends DistanceCalcEarth
C, DIST_EARTH, KM_MILE, METERS_PER_DEGREE, R, R_EQ| Constructor and Description |
|---|
DistanceCalcEuclidean() |
| Modifier and Type | Method and 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
|
BBox |
createBBox(double lat,
double lon,
double radiusInMeter) |
GHPoint |
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) |
GHPoint |
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).
|
String |
toString() |
calcCrossingPointToEdge, calcDistance, hasElevationDiff, validEdgeDistancepublic double calcDist(double fromY,
double fromX,
double toY,
double toX)
DistanceCalcEarthhttp://en.wikipedia.org/wiki/Haversine_formula a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) c = 2.atan2(√a, √(1−a)) d = R.c
calcDist in interface DistanceCalccalcDist in class DistanceCalcEarthpublic double calcDist3D(double fromY,
double fromX,
double fromHeight,
double toY,
double toX,
double toHeight)
DistanceCalcEarthcalcDist3D in interface DistanceCalccalcDist3D in class DistanceCalcEarthpublic double calcDenormalizedDist(double normedDist)
DistanceCalccalcDenormalizedDist in interface DistanceCalccalcDenormalizedDist in class DistanceCalcEarthpublic double calcNormalizedDist(double dist)
calcNormalizedDist in interface DistanceCalccalcNormalizedDist in class DistanceCalcEarthpublic double calcNormalizedDist(double fromY,
double fromX,
double toY,
double toX)
calcNormalizedDist in interface DistanceCalccalcNormalizedDist in class DistanceCalcEarthpublic String toString()
toString in class DistanceCalcEarthpublic double calcCircumference(double lat)
DistanceCalcEarthcalcCircumference in interface DistanceCalccalcCircumference in class DistanceCalcEarthpublic boolean isDateLineCrossOver(double lon1,
double lon2)
isDateLineCrossOver in class DistanceCalcEarthpublic BBox createBBox(double lat, double lon, double radiusInMeter)
createBBox in interface DistanceCalccreateBBox in class DistanceCalcEarthpublic GHPoint projectCoordinate(double latInDeg, double lonInDeg, double distanceInMeter, double headingClockwiseFromNorth)
DistanceCalcprojectCoordinate in interface DistanceCalcprojectCoordinate in class DistanceCalcEarthpublic GHPoint intermediatePoint(double f, double lat1, double lon1, double lat2, double lon2)
DistanceCalcintermediatePoint in interface DistanceCalcintermediatePoint in class DistanceCalcEarthpublic boolean isCrossBoundary(double lon1,
double lon2)
isCrossBoundary in interface DistanceCalcisCrossBoundary in class DistanceCalcEarthpublic double calcNormalizedEdgeDistance(double ry,
double rx,
double ay,
double ax,
double by,
double bx)
DistanceCalccalcNormalizedEdgeDistance in interface DistanceCalccalcNormalizedEdgeDistance in class DistanceCalcEarthpublic double calcNormalizedEdgeDistance3D(double ry,
double rx,
double rz,
double ay,
double ax,
double az,
double by,
double bx,
double bz)
DistanceCalccalcNormalizedEdgeDistance3D in interface DistanceCalccalcNormalizedEdgeDistance3D in class DistanceCalcEarthCopyright © 2012–2021. All rights reserved.