Package org.locationtech.proj4j.geoapi
Class Axis
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.Axis
-
- All Implemented Interfaces:
java.io.Serializable
,org.opengis.metadata.Identifier
,org.opengis.referencing.cs.CoordinateSystemAxis
,org.opengis.referencing.IdentifiedObject
,org.opengis.referencing.ReferenceIdentifier
final class Axis extends Wrapper implements org.opengis.referencing.cs.CoordinateSystemAxis, java.io.Serializable
A coordinate system axis.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
abbreviation
The coordinate system axis abbreviation.private boolean
angular
Whether the unit of measurement is degrees or metres.private byte
direction
The axis direction: 1=east, 2=north, 3=up.private static org.opengis.referencing.cs.AxisDirection[]
DIRECTIONS
The axis directions in the order declared in theGEOGRAPHIC
andPROJECTED
arrays.(package private) static Axis[]
GEOGRAPHIC
The axes for a geographic or projected CRS.(package private) static int
INDEX_OF_EAST
Index of the axis having the east direction inGEOGRAPHIC
andPROJECTED
arrays.private java.lang.String
name
The coordinate system axis name.(package private) static Axis[]
PROJECTED
The axes for a geographic or projected CRS.private javax.measure.Unit<?>
unit
Unit of measurement, cached when first requested.private double
unitScale
The scale factor to apply on unit of measurement.-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Axis(java.lang.String name, java.lang.String abbreviation, byte direction, boolean angular, double unitScale)
Creates a new axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAbbreviation()
{@return the axis abbreviation}.java.lang.String
getCode()
{@return the axis name}.org.opengis.referencing.cs.AxisDirection
getDirection()
double
getMaximumValue()
double
getMinimumValue()
org.opengis.referencing.cs.RangeMeaning
getRangeMeaning()
javax.measure.Unit<?>
getUnit()
(package private) java.lang.Object
implementation()
{@return an arbitrary value suitable for string representation}.(package private) Axis
withUnit(double scale)
Returns the same axis but with a unit of measurement multiplied by the given scale.-
Methods inherited from class org.locationtech.proj4j.geoapi.Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKT
-
-
-
-
Field Detail
-
GEOGRAPHIC
static final Axis[] GEOGRAPHIC
The axes for a geographic or projected CRS. Order is (down, west, south, null, east, north, up). Each axis shall be in the array at the index equal todirection
+ 3.
-
PROJECTED
static final Axis[] PROJECTED
The axes for a geographic or projected CRS. Order is (down, west, south, null, east, north, up). Each axis shall be in the array at the index equal todirection
+ 3.
-
DIRECTIONS
private static final org.opengis.referencing.cs.AxisDirection[] DIRECTIONS
The axis directions in the order declared in theGEOGRAPHIC
andPROJECTED
arrays.
-
INDEX_OF_EAST
static final int INDEX_OF_EAST
Index of the axis having the east direction inGEOGRAPHIC
andPROJECTED
arrays.- See Also:
- Constant Field Values
-
name
private final java.lang.String name
The coordinate system axis name.
-
abbreviation
private final java.lang.String abbreviation
The coordinate system axis abbreviation.
-
direction
private final byte direction
The axis direction: 1=east, 2=north, 3=up. The value may be negative for the opposite direction.
-
angular
private final boolean angular
Whether the unit of measurement is degrees or metres.
-
unitScale
private final double unitScale
The scale factor to apply on unit of measurement. For angular units, the base unit is degree, not radian.
-
unit
private transient javax.measure.Unit<?> unit
Unit of measurement, cached when first requested.
-
-
Constructor Detail
-
Axis
private Axis(java.lang.String name, java.lang.String abbreviation, byte direction, boolean angular, double unitScale)
Creates a new axis.- Parameters:
name
- the coordinate system axis nameabbreviation
- the coordinate system axis abbreviationnorth
- whether the axis is oriented toward north or east.angular
- whether the unit of measurement is degrees or metres.unitScale
- the scale factor to apply on unit of measurement.
-
-
Method Detail
-
withUnit
final Axis withUnit(double scale)
Returns the same axis but with a unit of measurement multiplied by the given scale.
-
implementation
java.lang.Object implementation()
{@return an arbitrary value suitable for string representation}.- Specified by:
implementation
in classWrapper
-
getCode
public java.lang.String getCode()
{@return the axis name}.
-
getAbbreviation
public java.lang.String getAbbreviation()
{@return the axis abbreviation}.- Specified by:
getAbbreviation
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getDirection
public org.opengis.referencing.cs.AxisDirection getDirection()
- Specified by:
getDirection
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getMinimumValue
public double getMinimumValue()
- Specified by:
getMinimumValue
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getMaximumValue
public double getMaximumValue()
- Specified by:
getMaximumValue
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getRangeMeaning
public org.opengis.referencing.cs.RangeMeaning getRangeMeaning()
- Specified by:
getRangeMeaning
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getUnit
public javax.measure.Unit<?> getUnit()
- Specified by:
getUnit
in interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
-