/*
 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
 * Copyright (C) 2006 - JScience (http://jscience.org/)
 * All rights reserved.
 * 
 * Permission to use, copy, modify, and distribute this software is
 * freely granted, provided that this notice is preserved.
 */

/*
 * This class has been adapted from JScience to use 
 * JSR-363 and newer versions of opengis by Daryn 
 * Butler, Engineering Technician at the United States
 * Department of Agriculture, 2019
 */

package usda.weru.gis.latlong;

import java.util.Collection;
import java.util.Set;

import systems.uom.common.USCustomary;

import usda.weru.gis.latlong.Coordinates;

import org.opengis.referencing.cs.AxisDirection;
import org.opengis.referencing.cs.CoordinateSystem;
import org.opengis.referencing.cs.CoordinateSystemAxis;
import org.opengis.util.InternationalString;
import org.opengis.util.GenericName;
import org.opengis.referencing.ReferenceIdentifier;

/**
 * This class represents a 2 dimensional surface reference system
 * based on an ellipsoidal approximation of a geoid.
 * 
 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
 * @version 3.0, February 13, 2006
 */
public abstract class GeographicCRS<C extends Coordinates<?>> extends CoordinateReferenceSystem<C> {

    /**
     * Holds the Geodetic Latitude/Longitude coordinate system.
     */
    public static final CoordinateSystem LATITUDE_LONGITUDE_CS = new CoordinateSystem() {

        Axis latitudeAxis = new Axis("Geodetic Latitude", "Lat", USCustomary.DEGREE_ANGLE,
                AxisDirection.NORTH);

        Axis longitudeAxis = new Axis("Geodetic Longitude", "Long", USCustomary.DEGREE_ANGLE,
                AxisDirection.EAST);
        
        public int getDimension() {
            return 2;
        }

        public CoordinateSystemAxis getAxis(int dimension) throws IndexOutOfBoundsException {
            switch(dimension) {
                case 0:
                    return latitudeAxis;
                case 1:
                    return longitudeAxis;
                default:
                    throw new IndexOutOfBoundsException();
            }
        }

        public ReferenceIdentifier getName() {
            throw new UnsupportedOperationException();
        }

        public Collection<GenericName> getAlias() {
            throw new UnsupportedOperationException();
            //return EMPTY_SET;
        }

        public Set<ReferenceIdentifier> getIdentifiers() {
            throw new UnsupportedOperationException();
            //return EMPTY_SET;
        }

        public InternationalString getRemarks() {
            throw new UnsupportedOperationException();
        }

        public String toWKT() throws UnsupportedOperationException {
            throw new UnsupportedOperationException();
        }
    };

}