Package org.opengis.example.referencing
Class SimpleAxis
- Object
-
- SimpleIdentifiedObject
-
- SimpleAxis
-
- All Implemented Interfaces:
Serializable
,Identifier
,CoordinateSystemAxis
,IdentifiedObject
,ReferenceIdentifier
public class SimpleAxis extends SimpleIdentifiedObject implements CoordinateSystemAxis
ACoordinateSystemAxis
defined by conventional symbols. This implementation infers some axis properties from the abbreviation, as documented in the following table:Axis properties inferred from the abbreviation Symbol Common name Axis direction Unit Range Meaning λ geodetic longitude EAST
degree ±90° EXACT
φ geodetic latitude NORTH
degree ±180° WRAPAROUND
h ellipsoidal height UP
Units.METRE
H gravity-related height UP
Units.METRE
d depth DOWN
Units.METRE
r geocentric radius UP
Units.METRE
[0…∞] Ω spherical longitude EAST
degree ±90° EXACT
Θ spherical latitude NORTH
degree ±180° WRAPAROUND
X geocentric X GEOCENTRIC_X
Units.METRE
Y geocentric Y GEOCENTRIC_Y
Units.METRE
Z geocentric Z GEOCENTRIC_Z
Units.METRE
E easting EAST
Units.METRE
W westing WEST
Units.METRE
N northing NORTH
Units.METRE
S southing SOUTH
Units.METRE
t time FUTURE
Units.SECOND
i column COLUMN_POSITIVE
AbstractUnit.ONE
j row ROW_POSITIVE
AbstractUnit.ONE
- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected char
abbreviation
The abbreviation used for this coordinate system axes.protected AxisDirection
direction
Direction of this coordinate system axis.static CoordinateSystemAxis
LATITUDE
The geodetic latitude axis.static CoordinateSystemAxis
LONGITUDE
The geodetic longitude axis.protected Unit<?>
unit
The unit of measure used for this coordinate system axis.-
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
-
-
Constructor Summary
Constructors Constructor Description SimpleAxis(Citation authority, String name, char abbreviation)
Creates a new axis for the given authority, name and abbreviation.SimpleAxis(Citation authority, String name, char abbreviation, AxisDirection direction, Unit<?> unit)
Creates a new axis for the given authority, name, units and direction.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object object)
Compares this axis with the given object for equality.String
getAbbreviation()
The abbreviation used for this coordinate system axes.AxisDirection
getDirection()
Direction of this coordinate system axis.double
getMaximumValue()
Returns the maximum value normally allowed for this axis, in the unit of measure for the axis.double
getMinimumValue()
Returns the minimum value normally allowed for this axis, in the unit of measure for the axis.RangeMeaning
getRangeMeaning()
Unit<?>
getUnit()
The unit of measure used for this coordinate system axis.-
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
-
-
-
-
Field Detail
-
LATITUDE
public static final CoordinateSystemAxis LATITUDE
The geodetic latitude axis. Values are increasing toward East, in decimal degrees.
-
LONGITUDE
public static final CoordinateSystemAxis LONGITUDE
The geodetic longitude axis. Values are increasing toward North, in decimal degrees.
-
abbreviation
protected final char abbreviation
The abbreviation used for this coordinate system axes. This abbreviation is also used to identify the ordinates in coordinate tuple. Examples are "X" and "Y".- See Also:
getAbbreviation()
-
direction
protected final AxisDirection direction
Direction of this coordinate system axis.- See Also:
getDirection()
-
unit
protected final Unit<?> unit
The unit of measure used for this coordinate system axis.- See Also:
getUnit()
-
-
Constructor Detail
-
SimpleAxis
public SimpleAxis(Citation authority, String name, char abbreviation) throws IllegalArgumentException
Creates a new axis for the given authority, name and abbreviation. The axis direction and units are inferred from the abbreviation using the table documented in the class javadoc.- Parameters:
authority
- organization responsible for definition of the name, ornull
.name
- the name of the new axis.abbreviation
- the abbreviation used for this coordinate system axes.- Throws:
IllegalArgumentException
- if the abbreviation is not one of the documented ones.
-
SimpleAxis
public SimpleAxis(Citation authority, String name, char abbreviation, AxisDirection direction, Unit<?> unit)
Creates a new axis for the given authority, name, units and direction. The following abbreviation are handled specially by this class:- λ for geodetic longitude
- φ for geodetic latitude
- Ω for spherical longitude
- Θ for spherical latitude
- r for geocentric radius
- Parameters:
authority
- organization responsible for definition of the name, ornull
.name
- the name of the new axis.abbreviation
- the abbreviation used for this coordinate system axes.direction
- direction of this coordinate system axis.unit
- the unit of measure used for this coordinate system axis.
-
-
Method Detail
-
getAbbreviation
public String getAbbreviation()
The abbreviation used for this coordinate system axes. This abbreviation is also used to identify the ordinates in coordinate tuple. Examples are "X" and "Y".- Specified by:
getAbbreviation
in interfaceCoordinateSystemAxis
-
getDirection
public AxisDirection getDirection()
Direction of this coordinate system axis.- Specified by:
getDirection
in interfaceCoordinateSystemAxis
-
getMinimumValue
public double getMinimumValue()
Returns the minimum value normally allowed for this axis, in the unit of measure for the axis. The default implementation infers the value from the abbreviation symbol:- 0 for r
- -90 for φ and Θ
- -180 for λ and Ω
NEGATIVE_INFINITY
for all other abbreviations
- Specified by:
getMinimumValue
in interfaceCoordinateSystemAxis
-
getMaximumValue
public double getMaximumValue()
Returns the maximum value normally allowed for this axis, in the unit of measure for the axis. The default implementation infers the value from the abbreviation symbol:- 90 for φ and Θ
- 180 for λ and Ω
POSITIVE_INFINITY
for all other abbreviations
- Specified by:
getMaximumValue
in interfaceCoordinateSystemAxis
-
getRangeMeaning
public RangeMeaning getRangeMeaning()
Returns the meaning of axis value range specified by the minimum and maximum values. The default implementation infers the value from the abbreviation symbol:EXACT
for φ and ΘWRAPAROUND
for λ and Ωnull
for all other abbreviations
- Specified by:
getRangeMeaning
in interfaceCoordinateSystemAxis
-
getUnit
public Unit<?> getUnit()
The unit of measure used for this coordinate system axis.- Specified by:
getUnit
in interfaceCoordinateSystemAxis
-
equals
public boolean equals(Object object)
Compares this axis 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.
-
-