public class Location extends HorizontalPosition
Location
Latitude (-180, 180) Longitude(-90, 90)Radius [0,∞)This class is IMMUTABLE.
This class rounds off values at the 4th decimal point.
コンストラクタと説明 |
---|
Location(double latitude,
double longitude,
double r) |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
compareTo(HorizontalPosition o)
Sorting order is latitude → longitude → radius.
|
boolean |
equals(java.lang.Object obj) |
double |
getDistance(Location location) |
Location[] |
getNearestLocation(Location[] locations) |
double |
getR() |
RThetaPhi |
getRThetaPhi() |
int |
hashCode() |
static double |
toLatitude(double theta) |
java.lang.String |
toString() |
XYZ |
toXYZ()
Cartesian coordinate
|
getAzimuth, getBackAzimuth, getEpicentralDistance, getGeocentricLatitude, getLatitude, getLongitude, getMidpoint, getPath, getPhi, getTheta, toLocation, toPoint2D, toXYZ
public Location(double latitude, double longitude, double r)
latitude
- [deg] geographical latitudelongitude
- [deg] longituder
- [km] radiuspublic static double toLatitude(double theta)
public int compareTo(HorizontalPosition o)
compareTo
インタフェース内 java.lang.Comparable<HorizontalPosition>
compareTo
クラス内 HorizontalPosition
public double getR()
public double getDistance(Location location)
location
- Location
to compute distance withpublic int hashCode()
hashCode
クラス内 HorizontalPosition
public boolean equals(java.lang.Object obj)
equals
クラス内 HorizontalPosition
public Location[] getNearestLocation(Location[] locations)
locations
- to be sorted.public java.lang.String toString()
toString
クラス内 HorizontalPosition