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 24 30 public abstract class ProjectedCRS<C extends Coordinates> extends CoordinateReferenceSystem<C> { 31 32 35 public static final CoordinateSystem EASTING_NORTHING_CS = new CoordinateSystem() { 36 37 Axis eastingAxis = new Axis("Easting", "E", SI.METER, 38 AxisDirection.EAST); 39 40 Axis northingAxis = new Axis("Northing", "N", SI.METER, 41 AxisDirection.NORTH); 42 43 public int getDimension() { 44 return 2; 45 } 46 47 public CoordinateSystemAxis getAxis(int dimension) 48 throws IndexOutOfBoundsException { 49 if (dimension == 0) { 50 return eastingAxis; 51 } else if (dimension == 1) { 52 return northingAxis; 53 } else { 54 throw new IndexOutOfBoundsException (); 55 } 56 } 57 58 public Identifier getName() { 59 throw new UnsupportedOperationException (); 60 } 61 62 public Collection getAlias() { 63 return EMPTY_SET; 64 } 65 66 public Set getIdentifiers() { 67 return EMPTY_SET; 68 } 69 70 public InternationalString getRemarks() { 71 throw new UnsupportedOperationException (); 72 } 73 74 public String toWKT() throws UnsupportedOperationException { 75 throw new UnsupportedOperationException (); 76 } 77 }; 78 79 } | Popular Tags |