org.geotools.measure
Class Longitude

java.lang.Object
  extended byorg.geotools.measure.Angle
      extended byorg.geotools.measure.Longitude
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public final class Longitude
extends Angle

A longitude angle. Positive longitudes are East, while negative longitudes are West.

Since:
2.0
Version:
$Id: Longitude.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Latitude, AngleFormat, Serialized Form

Field Summary
static double MAX_VALUE
          Maximum legal value for longitude (+180?).
static double MIN_VALUE
          Minimum legal value for longitude (-180?).
 
Constructor Summary
Longitude(double theta)
          Contruct a new longitude with the specified value.
Longitude(java.lang.String theta)
          Constructs a newly allocated object that represents the longitude value represented by the string.
 
Methods inherited from class org.geotools.measure.Angle
compareTo, degrees, equals, hashCode, radians, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final double MIN_VALUE
Minimum legal value for longitude (-180?).

See Also:
Constant Field Values

MAX_VALUE

public static final double MAX_VALUE
Maximum legal value for longitude (+180?).

See Also:
Constant Field Values
Constructor Detail

Longitude

public Longitude(double theta)
Contruct a new longitude with the specified value.

Parameters:
theta - Angle in degrees.

Longitude

public Longitude(java.lang.String theta)
          throws java.lang.NumberFormatException
Constructs a newly allocated object that represents the longitude value represented by the string. The string should represents an angle in either fractional degrees (e.g. 45.5?) or degrees with minutes and seconds (e.g. 45?30'). The hemisphere (E or W) is optional (default to East).

Parameters:
theta - A string to be converted to a .
Throws:
java.lang.NumberFormatException - if the string does not contain a parsable longitude.


Copyright © GeoTools. All Rights Reserved.