01: /*
02: * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
03: * Copyright (C) 2006 - JScience (http://jscience.org/)
04: * All rights reserved.
05: *
06: * Permission to use, copy, modify, and distribute this software is
07: * freely granted, provided that this notice is preserved.
08: */
09: package org.jscience.geography.coordinates.crs;
10:
11: import java.util.Collection;
12: import java.util.Set;
13:
14: import javax.measure.unit.NonSI;
15:
16: import org.jscience.geography.coordinates.Coordinates;
17: import org.opengis.metadata.Identifier;
18: import org.opengis.referencing.cs.AxisDirection;
19: import org.opengis.referencing.cs.CoordinateSystem;
20: import org.opengis.referencing.cs.CoordinateSystemAxis;
21: import org.opengis.util.InternationalString;
22:
23: /**
24: * This class represents a 2 dimensional surface reference system
25: * based on an ellipsoidal approximation of a geoid.
26: *
27: * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
28: * @version 3.0, February 13, 2006
29: */
30: public abstract class GeographicCRS<C extends Coordinates<?>> extends
31: CoordinateReferenceSystem<C> {
32:
33: /**
34: * Holds the Geodetic Latitude/Longitude coordinate system.
35: */
36: public static final CoordinateSystem LATITUDE_LONGITUDE_CS = new CoordinateSystem() {
37:
38: Axis latitudeAxis = new Axis("Geodetic Latitude", "Lat",
39: NonSI.DEGREE_ANGLE, AxisDirection.NORTH);
40:
41: Axis longitudeAxis = new Axis("Geodetic Longitude", "Long",
42: NonSI.DEGREE_ANGLE, AxisDirection.EAST);
43:
44: public int getDimension() {
45: return 2;
46: }
47:
48: public CoordinateSystemAxis getAxis(int dimension)
49: throws IndexOutOfBoundsException {
50: if (dimension == 0) {
51: return latitudeAxis;
52: } else if (dimension == 1) {
53: return longitudeAxis;
54: } else {
55: throw new IndexOutOfBoundsException();
56: }
57: }
58:
59: public Identifier getName() {
60: throw new UnsupportedOperationException();
61: }
62:
63: public Collection<String> getAlias() {
64: return EMPTY_SET;
65: }
66:
67: public Set<String> getIdentifiers() {
68: return EMPTY_SET;
69: }
70:
71: public InternationalString getRemarks() {
72: throw new UnsupportedOperationException();
73: }
74:
75: public String toWKT() throws UnsupportedOperationException {
76: throw new UnsupportedOperationException();
77: }
78: };
79:
80: }
|