01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2001, Institut de Recherche pour le Développement
06: * (C) 1999, Fisheries and Oceans Canada
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Lesser General Public
10: * License as published by the Free Software Foundation;
11: * version 2.1 of the License.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Lesser General Public License for more details.
17: */
18: package org.geotools.measure;
19:
20: /**
21: * A latitude angle. Positive latitudes are North, while negative
22: * latitudes are South. This class has no direct OpenGIS equivalent.
23: *
24: * @since 2.0
25: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/measure/Latitude.java $
26: * @version $Id: Latitude.java 20874 2006-08-07 10:00:01Z jgarnett $
27: * @author Martin Desruisseaux
28: *
29: * @see Longitude
30: * @see AngleFormat
31: */
32: public final class Latitude extends Angle {
33: /**
34: * Serial number for interoperability with different versions.
35: */
36: private static final long serialVersionUID = -4496748683919618976L;
37:
38: /**
39: * Minimum legal value for latitude (-90°).
40: */
41: public static final double MIN_VALUE = -90;
42:
43: /**
44: * Maximum legal value for latitude (+90°).
45: */
46: public static final double MAX_VALUE = +90;
47:
48: /**
49: * Contruct a new latitude with the specified value.
50: *
51: * @param theta Angle in degrees.
52: */
53: public Latitude(final double theta) {
54: super (theta);
55: }
56:
57: /**
58: * Constructs a newly allocated {@code Latitude} object that
59: * represents the latitude value represented by the string. The
60: * string should represents an angle in either fractional degrees
61: * (e.g. 45.5°) or degrees with minutes and seconds (e.g. 45°30').
62: * The hemisphere (N or S) is optional (default to North).
63: *
64: * @param theta A string to be converted to a {@code Latitude}.
65: * @throws NumberFormatException if the string does not contain a parsable latitude.
66: */
67: public Latitude(final String theta) throws NumberFormatException {
68: super(theta);
69: }
70: }
|