public class DistancePlaneProjection extends DistanceCalcEarth
http://en.wikipedia.org/wiki/Geographical_distance#Spherical_Earth_projected_to_a_plane
http://stackoverflow.com/q/1006654
http://en.wikipedia.org/wiki/Mercator_projection#Mathematics_of_the_Mercator_projection http://gis.stackexchange.com/questions/4906/why-is-law-of-cosines-more-preferable-than-haversine-when-calculating-distance-b
C, KM_MILE, R, R_EQ
Constructor and Description |
---|
DistancePlaneProjection() |
Modifier and Type | Method and Description |
---|---|
double |
calcDenormalizedDist(double normedDist)
Inverse to calcNormalizedDist.
|
double |
calcDist(double fromLat,
double fromLon,
double toLat,
double toLon)
Calculates distance of (from, to) in meter.
|
double |
calcNormalizedDist(double dist)
Returns the specified length in normalized meter.
|
double |
calcNormalizedDist(double fromLat,
double fromLon,
double toLat,
double toLon)
Calculates in normalized meter
|
String |
toString() |
calcCircumference, calcCrossingPointToEdge, calcNormalizedEdgeDistance, calcNormalizedEdgeDistanceNew, createBBox, isCrossBoundary, isDateLineCrossOver, projectCoordinate, validEdgeDistance
public double calcDist(double fromLat, double fromLon, double toLat, double toLon)
DistanceCalcEarth
http://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 DistanceCalc
calcDist
in class DistanceCalcEarth
public double calcDenormalizedDist(double normedDist)
DistanceCalc
calcDenormalizedDist
in interface DistanceCalc
calcDenormalizedDist
in class DistanceCalcEarth
public double calcNormalizedDist(double dist)
DistanceCalcEarth
calcNormalizedDist
in interface DistanceCalc
calcNormalizedDist
in class DistanceCalcEarth
public double calcNormalizedDist(double fromLat, double fromLon, double toLat, double toLon)
DistanceCalc
calcNormalizedDist
in interface DistanceCalc
calcNormalizedDist
in class DistanceCalcEarth
public String toString()
toString
in class DistanceCalcEarth
Copyright © 2012–2018. All rights reserved.