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 3 dimensional spatial 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 GeocentricCRS<C extends Coordinates<?>> extends 030 CoordinateReferenceSystem<C> { 031 032 /** 033 * Holds the XYZ coordinate system. 034 */ 035 public static final CoordinateSystem XYZ_CS = new CoordinateSystem() { 036 037 Axis xAxis = new Axis("Geocentric X", "X", SI.METRE, 038 AxisDirection.GEOCENTRIC_X); 039 040 Axis yAxis = new Axis("Geocentric Y", "Y", SI.METRE, 041 AxisDirection.GEOCENTRIC_Y); 042 043 Axis zAxis = new Axis("Geocentric Z", "Z", SI.METRE, 044 AxisDirection.GEOCENTRIC_Z); 045 046 public int getDimension() { 047 return 3; 048 } 049 050 public CoordinateSystemAxis getAxis(int dimension) 051 throws IndexOutOfBoundsException { 052 if (dimension == 0) { 053 return xAxis; 054 } else if (dimension == 1) { 055 return yAxis; 056 } else if (dimension == 2) { 057 return zAxis; 058 } else { 059 throw new IndexOutOfBoundsException(); 060 } 061 } 062 063 public Identifier getName() { 064 throw new UnsupportedOperationException(); 065 } 066 067 public Collection<String> getAlias() { 068 return EMPTY_SET; 069 } 070 071 public Set<String> getIdentifiers() { 072 return EMPTY_SET; 073 } 074 075 public InternationalString getRemarks() { 076 throw new UnsupportedOperationException(); 077 } 078 079 public String toWKT() throws UnsupportedOperationException { 080 throw new UnsupportedOperationException(); 081 } 082 }; 083 084 085}