001/*
002 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
003 * Copyright (C) 2006 - JScience (http://jscience.org/)
004 * All rights reserved.
005 * 
006 * Permission to use, copy, modify, and distribute this software is
007 * freely granted, provided that this notice is preserved.
008 */
009package org.jscience.geography.coordinates.crs;
010
011import java.util.Collection;
012import java.util.Set;
013
014import javax.measure.unit.NonSI;
015
016import org.jscience.geography.coordinates.Coordinates;
017import org.opengis.metadata.Identifier;
018import org.opengis.referencing.cs.AxisDirection;
019import org.opengis.referencing.cs.CoordinateSystem;
020import org.opengis.referencing.cs.CoordinateSystemAxis;
021import org.opengis.util.InternationalString;
022
023/**
024 * This class represents a 2 dimensional surface reference system
025 * based on an ellipsoidal approximation of a geoid.
026 * 
027 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
028 * @version 3.0, February 13, 2006
029 */
030public abstract class GeographicCRS<C extends Coordinates<?>> extends CoordinateReferenceSystem<C> {
031
032    /**
033     * Holds the Geodetic Latitude/Longitude coordinate system.
034     */
035    public static final CoordinateSystem LATITUDE_LONGITUDE_CS = new CoordinateSystem() {
036
037        Axis latitudeAxis = new Axis("Geodetic Latitude", "Lat", NonSI.DEGREE_ANGLE,
038                AxisDirection.NORTH);
039
040        Axis longitudeAxis = new Axis("Geodetic Longitude", "Long", NonSI.DEGREE_ANGLE,
041                AxisDirection.EAST);
042        
043        public int getDimension() {
044            return 2;
045        }
046
047        public CoordinateSystemAxis getAxis(int dimension)
048                throws IndexOutOfBoundsException {
049            if (dimension == 0) {
050                return latitudeAxis;
051            } else if (dimension == 1) {
052                return longitudeAxis;
053            } else {
054                throw new IndexOutOfBoundsException();
055            }
056        }
057
058        public Identifier getName() {
059            throw new UnsupportedOperationException();
060        }
061
062        public Collection<String> getAlias() {
063            return EMPTY_SET;
064        }
065
066        public Set<String> getIdentifiers() {
067            return EMPTY_SET;
068        }
069
070        public InternationalString getRemarks() {
071            throw new UnsupportedOperationException();
072        }
073
074        public String toWKT() throws UnsupportedOperationException {
075            throw new UnsupportedOperationException();
076        }
077    };
078
079}