public class GeoUtil extends Object
| Constructor and Description |
|---|
GeoUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Double |
haversin(Double theta)
haversin(0)
|
static Double |
kmBetweenTwoPoints(Double lat1,
Double lon1,
Double lat2,
Double lon2)
Returns the distance (in kilometers) between two points of a given longitude and latitude
relatively accurately (using a spherical approximation of the Earth) through the Haversin
Distance Formula for great arc distance on a sphere with accuracy for small distances
|
public static Double haversin(Double theta)
Taken from: https://github.com/ameihm0912/geomodel/blob/master/geo.go
http://en.wikipedia.org/wiki/Haversine_formula
theta - anglepublic static Double kmBetweenTwoPoints(Double lat1, Double lon1, Double lat2, Double lon2)
Taken from: https://github.com/ameihm0912/geomodel/blob/master/geo.go
http://en.wikipedia.org/wiki/Haversine_formula
lat1 - Latitude 1lon1 - Longitude 1lat2 - Latitude 2lon2 - Longitude 2Copyright © 2022. All rights reserved.