|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.spatial.geometry.LatLng
public abstract class LatLng
Abstract base lat-lng class which can manipulate fixed point or floating point based coordinates. Instances are immutable.
NOTE: This API is still in
flux and might change in incompatible ways in the next
release.
Constructor Summary | |
---|---|
LatLng()
|
Method Summary | |
---|---|
double |
arcDistance(LatLng ll2)
Calculates the distance between two lat/lng's in miles. |
double |
arcDistance(LatLng ll2,
DistanceUnits lUnits)
Calculates the distance between two lat/lng's in miles or meters. |
abstract LatLng |
calculateMidpoint(LatLng other)
Calculate the midpoint between this point an another. |
abstract LatLng |
copy()
|
abstract boolean |
equals(Object obj)
|
static LatLng |
fromCartesian(CartesianPoint pt)
The inverse of toCartesian(). |
abstract int |
getFixedLat()
|
abstract int |
getFixedLng()
|
abstract double |
getLat()
|
abstract double |
getLng()
|
abstract int |
hashCode()
|
abstract boolean |
isFixedPoint()
|
abstract boolean |
isNormalized()
|
abstract LatLng |
normalize()
|
CartesianPoint |
toCartesian()
Convert the lat/lng into the cartesian coordinate plane such that all world coordinates are represented in the first quadrant. |
abstract FixedLatLng |
toFixed()
|
abstract FloatLatLng |
toFloat()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LatLng()
Method Detail |
---|
public abstract boolean isNormalized()
public abstract boolean isFixedPoint()
public abstract LatLng normalize()
public abstract int getFixedLat()
public abstract int getFixedLng()
public abstract double getLat()
public abstract double getLng()
public abstract LatLng copy()
public abstract FixedLatLng toFixed()
public abstract FloatLatLng toFloat()
public CartesianPoint toCartesian()
public static LatLng fromCartesian(CartesianPoint pt)
pt
- public double arcDistance(LatLng ll2)
ll2
- Second lat,lng position to calculate distance to.
public double arcDistance(LatLng ll2, DistanceUnits lUnits)
ll2
- Second lat,lng position to calculate distance to.lUnits
- Units to calculate distance, defaults to miles
public String toString()
toString
in class Object
public abstract LatLng calculateMidpoint(LatLng other)
other
- public abstract int hashCode()
hashCode
in class Object
public abstract boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |