org.elasticsearch.index.search.geo
Class LatLng
java.lang.Object
org.elasticsearch.index.search.geo.LatLng
public class LatLng
- extends java.lang.Object
Constructor Summary |
LatLng(double lat,
double lng)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LatLng
public LatLng(double lat,
double lng)
isNormalized
public boolean isNormalized()
normalize
public LatLng normalize()
getLat
public double getLat()
getLng
public double getLng()
equals
public boolean equals(LatLng other)
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
arcDistance
public double arcDistance(LatLng ll2)
- Calculates the distance between two lat/lng's in miles.
Imported from mq java client.
- Parameters:
ll2
- Second lat,lng position to calculate distance to.
- Returns:
- Returns the distance in miles.
arcDistance
public double arcDistance(LatLng ll2,
DistanceUnit lUnits)
- Calculates the distance between two lat/lng's in miles or meters.
Imported from mq java client. Variable references changed to match.
- Parameters:
ll2
- Second lat,lng position to calculate distance to.lUnits
- Units to calculate distace, defaults to miles
- Returns:
- Returns the distance in meters or miles.