1 9 package org.jscience.geography.coordinates.crs; 10 11 import java.util.Collection ; 12 import java.util.Set ; 13 14 import javax.measure.units.SI; 15 16 import org.jscience.geography.coordinates.Coordinates; 17 import org.opengis.metadata.Identifier; 18 import org.opengis.referencing.cs.AxisDirection; 19 import org.opengis.referencing.cs.CoordinateSystem; 20 import org.opengis.referencing.cs.CoordinateSystemAxis; 21 import org.opengis.util.InternationalString; 22 23 29 public abstract class GeocentricCRS<C extends Coordinates> extends 30 CoordinateReferenceSystem<C> { 31 32 35 public static final CoordinateSystem XYZ_CS = new CoordinateSystem() { 36 37 Axis xAxis = new Axis("Geocentric X", "X", SI.METER, 38 AxisDirection.GEOCENTRIC_X); 39 40 Axis yAxis = new Axis("Geocentric Y", "Y", SI.METER, 41 AxisDirection.GEOCENTRIC_Y); 42 43 Axis zAxis = new Axis("Geocentric Z", "Z", SI.METER, 44 AxisDirection.GEOCENTRIC_Z); 45 46 public int getDimension() { 47 return 3; 48 } 49 50 public CoordinateSystemAxis getAxis(int dimension) 51 throws IndexOutOfBoundsException { 52 if (dimension == 0) { 53 return xAxis; 54 } else if (dimension == 1) { 55 return yAxis; 56 } else if (dimension == 2) { 57 return zAxis; 58 } else { 59 throw new IndexOutOfBoundsException (); 60 } 61 } 62 63 public Identifier getName() { 64 throw new UnsupportedOperationException (); 65 } 66 67 public Collection getAlias() { 68 return EMPTY_SET; 69 } 70 71 public Set getIdentifiers() { 72 return EMPTY_SET; 73 } 74 75 public InternationalString getRemarks() { 76 throw new UnsupportedOperationException (); 77 } 78 79 public String toWKT() throws UnsupportedOperationException { 80 throw new UnsupportedOperationException (); 81 } 82 }; 83 84 85 } | Popular Tags |