|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.proj.Length
Length is a convenience class used for a couple of things. It can be used to specifiy unit type, and can be used for conversion from radians to/from whatever units are represented by the implemented class.
Field Summary | |
protected java.lang.String |
abbr
|
protected double |
constant
Unit/radians |
static Length |
DECIMAL_DEGREE
Decimal Degrees, in WGS 84 Spherical earth model units. |
static Length |
DM
Data Mile, in WGS 84 spherical earth model units. |
static Length |
FEET
Feet, in WGS 84 spherical earth model units. |
static Length |
KM
Kilometers, in WGS 84 Spherical earth model units. |
static Length |
METER
Meters, in WGS 84 Spherical earth model units. |
static Length |
MILE
Miles, in WGS 84 spherical earth model units. |
protected java.lang.String |
name
|
static Length |
NM
Nautical Miles, in WGS 84 Spherical earth model units. |
static Length |
RADIAN
Radians, in terms of a spherical earth. |
Constructor Summary | |
Length(java.lang.String name,
java.lang.String abbr,
double unitEquatorCircumference)
Create a Length, with a name an the number of it's units that go around the earth at its equator. |
Method Summary | |
double |
fromRadians(double numRadians)
Given a number of radians, convert to the number of units represented by this length. |
float |
fromRadians(float numRadians)
Given a number of radians, convert to the number of units represented by this length. |
static Length |
get(java.lang.String name)
Get the Length object with the given name or abbreviation. |
java.lang.String |
getAbbr()
Return the abbreviation for this length type. |
static Length[] |
getAvailable()
Get a list of the Lengths currently defined as static implementations of this class. |
double |
toRadians(double numUnits)
|
float |
toRadians(float numUnits)
Given a number of units provided by this Length, convert to a number of radians. |
java.lang.String |
toString()
Return the name for this length type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Length MILE
public static final Length FEET
public static final Length METER
public static final Length KM
public static final Length NM
public static final Length DECIMAL_DEGREE
public static final Length RADIAN
public static final Length DM
protected final double constant
protected final java.lang.String name
protected final java.lang.String abbr
Constructor Detail |
public Length(java.lang.String name, java.lang.String abbr, double unitEquatorCircumference)
Method Detail |
public float toRadians(float numUnits)
public double toRadians(double numUnits)
public float fromRadians(float numRadians)
public double fromRadians(double numRadians)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAbbr()
public static Length[] getAvailable()
public static Length get(java.lang.String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |