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
ACoordinateReferenceSystem
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
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleCRS.Geographic
AGeographicCRS
specialization ofSimpleCRS
.static class
SimpleCRS.Temporal
ATemporalCRS
specialization ofSimpleCRS
with its own datum.static class
SimpleCRS.Vertical
AVerticalCRS
specialization ofSimpleCRS
with its own datum.
-
Field Summary
Fields Modifier and Type Field Description protected CoordinateSystemAxis[]
axes
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
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 boolean
equals(Object object)
Compares this CRS with the given object for equality.CoordinateSystemAxis
getAxis(int dimension)
Returns the coordinate axis at the given dimension.CoordinateSystem
getCoordinateSystem()
Returns the coordinate system, which is represented directly bythis
implementation class since it does not distinguish CS and CRS.int
getDimension()
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 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
public final CoordinateSystemAxis getAxis(int dimension) throws IndexOutOfBoundsException
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
public boolean equals(Object object)
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 equals to this object.
-
-