Package org.opengis.example.referencing
Class SimpleCRS
- Object
-
- SimpleIdentifiedObject
-
- SimpleCRS
-
- All Implemented Interfaces:
Serializable,Identifier,CoordinateReferenceSystem,SingleCRS,CoordinateSystem,IdentifiedObject,ReferenceIdentifier,ReferenceSystem
- Direct Known Subclasses:
SimpleCRS.Geographic,SimpleCRS.Temporal,SimpleCRS.Vertical
public abstract class SimpleCRS extends SimpleIdentifiedObject implements SingleCRS, CoordinateSystem
ACoordinateReferenceSystemabstract base class. This class does not make distinction between Coordinate System and Coordinate Reference System, so we implement the two interfaces by the same class.- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleCRS.GeographicAGeographicCRSspecialization ofSimpleCRS.static classSimpleCRS.TemporalATemporalCRSspecialization ofSimpleCRSwith its own datum.static classSimpleCRS.VerticalAVerticalCRSspecialization ofSimpleCRSwith its own datum.
-
Field Summary
Fields Modifier and Type Field Description protected CoordinateSystemAxis[]axesThe coordinate system axes.-
Fields inherited from class SimpleIdentifiedObject
authority, code
-
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Fields inherited from interface Identifier
AUTHORITY_KEY, CODE_KEY, CODESPACE_KEY, DESCRIPTION_KEY, VERSION_KEY
-
Fields inherited from interface ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
-
-
Constructor Summary
Constructors Constructor Description SimpleCRS(Citation authority, String name, CoordinateSystemAxis... axes)Creates a new CRS for the given name, datum and axes.
-
Method Summary
Modifier and Type Method Description booleanequals(Object object)Compares this CRS with the given object for equality.CoordinateSystemAxisgetAxis(int dimension)Returns the coordinate axis at the given dimension.CoordinateSystemgetCoordinateSystem()Returns the coordinate system, which is represented directly bythisimplementation class since it does not distinguish CS and CRS.intgetDimension()Returns the dimension of the coordinate system.-
Methods inherited from class SimpleIdentifiedObject
getAuthority, getCode, getCodeSpace, getDomainOfValidity, getName, getScope, hashCode, toString, toWKT
-
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Methods inherited from interface Identifier
getDescription, getVersion
-
Methods inherited from interface ReferenceSystem
getDomainOfValidity, getScope
-
-
-
-
Field Detail
-
axes
protected final CoordinateSystemAxis[] axes
The coordinate system axes. The length of this array is the coordinate system dimension.- See Also:
getDimension(),getAxis(int)
-
-
Constructor Detail
-
SimpleCRS
public SimpleCRS(Citation authority, String name, CoordinateSystemAxis... axes)
Creates a new CRS for the given name, datum and axes.- Parameters:
authority- organization responsible for definition of the CRS, ornull.name- the name of the new CRS.axes- the axes to be returned bygetAxis(int). The length of this array is the coordinate system dimension.
-
-
Method Detail
-
getCoordinateSystem
public CoordinateSystem getCoordinateSystem()
Returns the coordinate system, which is represented directly bythisimplementation class since it does not distinguish CS and CRS.- Specified by:
getCoordinateSystemin interfaceCoordinateReferenceSystem- Specified by:
getCoordinateSystemin interfaceSingleCRS- Returns:
- the coordinate system.
-
getDimension
public final int getDimension()
Returns the dimension of the coordinate system.- Specified by:
getDimensionin interfaceCoordinateSystem- Returns:
- the dimension of the coordinate system.
-
getAxis
public final CoordinateSystemAxis getAxis(int dimension) throws IndexOutOfBoundsException
Returns the coordinate axis at the given dimension.- Specified by:
getAxisin interfaceCoordinateSystem- Parameters:
dimension- the zero based index of axis.- Returns:
- the axis at the specified dimension.
- Throws:
IndexOutOfBoundsException- ifdimensionis out of bounds.
-
equals
public boolean equals(Object object)
Compares this CRS with the given object for equality.- Overrides:
equalsin classSimpleIdentifiedObject- Parameters:
object- the object to compare with thisSimpleCRS.- Returns:
trueif the given object is equals to this object.
-
-