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.StringabbreviationThe coordinate system axis abbreviation.private booleanangularWhether the unit of measurement is degrees or metres.private bytedirectionThe axis direction: 1=east, 2=north, 3=up.private static org.opengis.referencing.cs.AxisDirection[]DIRECTIONSThe axis directions in the order declared in theGEOGRAPHICandPROJECTEDarrays.(package private) static Axis[]GEOGRAPHICThe axes for a geographic or projected CRS.(package private) static intINDEX_OF_EASTIndex of the axis having the east direction inGEOGRAPHICandPROJECTEDarrays.private java.lang.StringnameThe coordinate system axis name.(package private) static Axis[]PROJECTEDThe axes for a geographic or projected CRS.private javax.measure.Unit<?>unitUnit of measurement, cached when first requested.private doubleunitScaleThe 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 privateAxis(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.StringgetAbbreviation(){@return the axis abbreviation}.java.lang.StringgetCode(){@return the axis name}.org.opengis.referencing.cs.AxisDirectiongetDirection()doublegetMaximumValue()doublegetMinimumValue()org.opengis.referencing.cs.RangeMeaninggetRangeMeaning()javax.measure.Unit<?>getUnit()(package private) java.lang.Objectimplementation(){@return an arbitrary value suitable for string representation}.(package private) AxiswithUnit(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 theGEOGRAPHICandPROJECTEDarrays.
-
INDEX_OF_EAST
static final int INDEX_OF_EAST
Index of the axis having the east direction inGEOGRAPHICandPROJECTEDarrays.- 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:
implementationin classWrapper
-
getCode
public java.lang.String getCode()
{@return the axis name}.
-
getAbbreviation
public java.lang.String getAbbreviation()
{@return the axis abbreviation}.- Specified by:
getAbbreviationin interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getDirection
public org.opengis.referencing.cs.AxisDirection getDirection()
- Specified by:
getDirectionin interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getMinimumValue
public double getMinimumValue()
- Specified by:
getMinimumValuein interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getMaximumValue
public double getMaximumValue()
- Specified by:
getMaximumValuein interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getRangeMeaning
public org.opengis.referencing.cs.RangeMeaning getRangeMeaning()
- Specified by:
getRangeMeaningin interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
getUnit
public javax.measure.Unit<?> getUnit()
- Specified by:
getUnitin interfaceorg.opengis.referencing.cs.CoordinateSystemAxis
-
-