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.SI;
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 1 dimensional vertical reference system.
025 * 
026 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
027 * @version 3.0, February 13, 2006
028 */
029public abstract class VerticalCRS<C extends Coordinates<?>> extends CoordinateReferenceSystem<C> {
030    
031    /**
032     * Holds the gravity-related height coordinate system.
033     */
034    public static final CoordinateSystem HEIGHT_CS = new CoordinateSystem() {
035
036        Axis heightAxis = new Axis("Gravity-related height", "Height", SI.METRE,
037                AxisDirection.UP);
038
039        public int getDimension() {
040            return 1;
041        }
042
043        public CoordinateSystemAxis getAxis(int dimension)
044                throws IndexOutOfBoundsException {
045            if (dimension == 0) {
046                return heightAxis;
047            } else {
048                throw new IndexOutOfBoundsException();
049            }
050        }
051
052        public Identifier getName() {
053            throw new UnsupportedOperationException();
054        }
055
056        public Collection<String> getAlias() {
057            return EMPTY_SET;
058        }
059
060        public Set<String> getIdentifiers() {
061            return EMPTY_SET;
062        }
063
064        public InternationalString getRemarks() {
065            throw new UnsupportedOperationException();
066        }
067
068        public String toWKT() throws UnsupportedOperationException {
069            throw new UnsupportedOperationException();
070        }
071    };
072
073}