Object
SimpleIdentifiedObject
SimpleCRS
- All Implemented Interfaces:
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
A
CoordinateReferenceSystem
abstract 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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AGeographicCRS
specialization ofSimpleCRS
.static class
ATemporalCRS
specialization ofSimpleCRS
with its own datum.static class
AVerticalCRS
specialization ofSimpleCRS
with its own datum. -
Field Summary
Modifier and TypeFieldDescriptionprotected final CoordinateSystemAxis[]
The 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
ConstructorDescriptionSimpleCRS
(Citation authority, String name, CoordinateSystemAxis... axes) Creates a new CRS for the given name, datum and axes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this CRS with the given object for equality.final CoordinateSystemAxis
getAxis
(int dimension) Returns the coordinate axis at the given dimension.Returns the coordinate system, which is represented directly bythis
implementation class since it does not distinguish CS and CRS.final int
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 Details
-
axes
The coordinate system axes. The length of this array is the coordinate system dimension.- See Also:
-
-
Constructor Details
-
SimpleCRS
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 Details
-
getCoordinateSystem
Returns the coordinate system, which is represented directly bythis
implementation class since it does not distinguish CS and CRS.- Specified by:
getCoordinateSystem
in interfaceCoordinateReferenceSystem
- Specified by:
getCoordinateSystem
in interfaceSingleCRS
- Returns:
- the coordinate system.
-
getDimension
public final int getDimension()Returns the dimension of the coordinate system.- Specified by:
getDimension
in interfaceCoordinateSystem
- Returns:
- the dimension of the coordinate system.
-
getAxis
Returns the coordinate axis at the given dimension.- Specified by:
getAxis
in interfaceCoordinateSystem
- Parameters:
dimension
- the zero based index of axis.- Returns:
- the axis at the specified dimension.
- Throws:
IndexOutOfBoundsException
- ifdimension
is out of bounds.
-
equals
Compares this CRS with the given object for equality.- Overrides:
equals
in classSimpleIdentifiedObject
- Parameters:
object
- the object to compare with thisSimpleCRS
.- Returns:
true
if the given object is equal to this object.
-