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/** 025 * This class represents a 2-dimensional projected reference system. 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 ProjectedCRS<C extends Coordinates<?>> extends CoordinateReferenceSystem<C> { 031 032 /** 033 * Holds the Easting/Northing coordinate system. 034 */ 035 public static final CoordinateSystem EASTING_NORTHING_CS = new CoordinateSystem() { 036 037 Axis eastingAxis = new Axis("Easting", "E", SI.METRE, 038 AxisDirection.EAST); 039 040 Axis northingAxis = new Axis("Northing", "N", SI.METRE, 041 AxisDirection.NORTH); 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 eastingAxis; 051 } else if (dimension == 1) { 052 return northingAxis; 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}