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, validEdgeDistancepublic double calcDist(double fromLat,
double fromLon,
double toLat,
double toLon)
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 calcDenormalizedDist(double normedDist)
DistanceCalccalcDenormalizedDist in interface DistanceCalccalcDenormalizedDist in class DistanceCalcEarthpublic double calcNormalizedDist(double dist)
DistanceCalcEarthcalcNormalizedDist in interface DistanceCalccalcNormalizedDist in class DistanceCalcEarthpublic double calcNormalizedDist(double fromLat,
double fromLon,
double toLat,
double toLon)
DistanceCalccalcNormalizedDist in interface DistanceCalccalcNormalizedDist in class DistanceCalcEarthpublic String toString()
toString in class DistanceCalcEarthCopyright © 2012–2018. All rights reserved.