org.apache.lucene.spatial.geometry
Class FixedLatLng

java.lang.Object
  extended by org.apache.lucene.spatial.geometry.LatLng
      extended by org.apache.lucene.spatial.geometry.FixedLatLng

public class FixedLatLng
extends LatLng

NOTE: This API is still in flux and might change in incompatible ways in the next release.


Field Summary
static double SCALE_FACTOR
           
static int SCALE_FACTOR_INT
           
 
Constructor Summary
FixedLatLng(int lat, int lng)
           
FixedLatLng(LatLng ll)
           
 
Method Summary
 LatLng calculateMidpoint(LatLng other)
          Calculate the midpoint between this point an another.
 LatLng copy()
           
static int doubleToFixed(double d)
           
 boolean equals(Object obj)
           
static double fixedToDouble(int fixed)
           
 int getFixedLat()
           
 int getFixedLng()
           
 double getLat()
           
 double getLng()
           
 int hashCode()
           
 boolean isFixedPoint()
           
 boolean isNormalized()
           
 LatLng normalize()
           
protected  void setLat(int lat)
           
protected  void setLng(int lng)
           
 FixedLatLng toFixed()
           
 FloatLatLng toFloat()
           
 
Methods inherited from class org.apache.lucene.spatial.geometry.LatLng
arcDistance, arcDistance, fromCartesian, toCartesian, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SCALE_FACTOR

public static final double SCALE_FACTOR
See Also:
Constant Field Values

SCALE_FACTOR_INT

public static final int SCALE_FACTOR_INT
See Also:
Constant Field Values
Constructor Detail

FixedLatLng

public FixedLatLng(int lat,
                   int lng)

FixedLatLng

public FixedLatLng(LatLng ll)
Method Detail

setLat

protected void setLat(int lat)

setLng

protected void setLng(int lng)

fixedToDouble

public static double fixedToDouble(int fixed)

doubleToFixed

public static int doubleToFixed(double d)

copy

public LatLng copy()
Specified by:
copy in class LatLng

getFixedLat

public int getFixedLat()
Specified by:
getFixedLat in class LatLng

getFixedLng

public int getFixedLng()
Specified by:
getFixedLng in class LatLng

getLat

public double getLat()
Specified by:
getLat in class LatLng

getLng

public double getLng()
Specified by:
getLng in class LatLng

isFixedPoint

public boolean isFixedPoint()
Specified by:
isFixedPoint in class LatLng

toFixed

public FixedLatLng toFixed()
Specified by:
toFixed in class LatLng

toFloat

public FloatLatLng toFloat()
Specified by:
toFloat in class LatLng

isNormalized

public boolean isNormalized()
Specified by:
isNormalized in class LatLng

normalize

public LatLng normalize()
Specified by:
normalize in class LatLng

calculateMidpoint

public LatLng calculateMidpoint(LatLng other)
Description copied from class: LatLng
Calculate the midpoint between this point an another. Respects fixed vs floating point

Specified by:
calculateMidpoint in class LatLng

hashCode

public int hashCode()
Specified by:
hashCode in class LatLng

equals

public boolean equals(Object obj)
Specified by:
equals in class LatLng


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.