Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.proj
Class Length

    java.lang.Object
      com.bbn.openmap.proj.Length

public class Length
extends java.lang.Object

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.
`protected I18n` | `i18n`
`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.
`protected double` | `unitEquatorCircumference`

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

### MILE

    public static final Length MILE

  Miles, in WGS 84 spherical earth model units.

### FEET

    public static final Length FEET

  Feet, in WGS 84 spherical earth model units.

### METER

    public static final Length METER

  Meters, in WGS 84 Spherical earth model units.

### KM

    public static final Length KM

  Kilometers, in WGS 84 Spherical earth model units.

### NM

    public static final Length NM

  Nautical Miles, in WGS 84 Spherical earth model units.

### DECIMAL_DEGREE

    public static final Length DECIMAL_DEGREE

  Decimal Degrees, in WGS 84 Spherical earth model units.

### RADIAN

    public static final Length RADIAN

  Radians, in terms of a spherical earth.

### DM

    public static final Length DM

  Data Mile, in WGS 84 spherical earth model units.

### constant

    protected final double constant

  Unit/radians

### name

    protected final java.lang.String name

### abbr

    protected final java.lang.String abbr

### unitEquatorCircumference

    protected double unitEquatorCircumference

### i18n

    protected I18n i18n

Constructor Detail

### Length

    public 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. The name and abbreviation are converted to lower case for consistency.

Method Detail

### toRadians

    public float toRadians(float numUnits)

  Given a number of units provided by this Length, convert to a number of radians.

### toRadians

    public double toRadians(double numUnits)

### fromRadians

    public float fromRadians(float numRadians)

  Given a number of radians, convert to the number of units represented by this length.

### fromRadians

    public double fromRadians(double numRadians)

  Given a number of radians, convert to the number of units represented by this length.

### toString

    public java.lang.String toString()

  Return the name for this length type.

### getAbbr

    public java.lang.String getAbbr()

  Return the abbreviation for this length type.

### getAvailable

    public static Length[] getAvailable()

  Get a list of the Lengths currently defined as static implementations of this class.

### get

    public static Length get(java.lang.String name)

  Get the Length object with the given name or abbreviation. If nothing exists with that name, then return null. The lower case version of the name or abbreviation is checked against the available options.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details