Class Axis

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.Axis
All Implemented Interfaces:
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, Serializable
A coordinate system axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The coordinate system axis abbreviation.
    private final boolean
    Whether the unit of measurement is degrees or metres.
    private final byte
    The axis direction: 1=east, 2=north, 3=up.
    private static final org.opengis.referencing.cs.AxisDirection[]
    The axis directions in the order declared in the GEOGRAPHIC and PROJECTED arrays.
    (package private) static final Axis[]
    The axes for a geographic or projected CRS.
    (package private) static final int
    Index of the axis having the east direction in GEOGRAPHIC and PROJECTED arrays.
    private final String
    The coordinate system axis name.
    (package private) static final Axis[]
    The axes for a geographic or projected CRS.
    private javax.measure.Unit<?>
    Unit of measurement, cached when first requested.
    private final double
    The scale factor to apply on unit of measurement.

    Fields inherited from class Wrapper

    BIDIMENSIONAL, TRIDIMENSIONAL

    Fields inherited from interface org.opengis.referencing.IdentifiedObject

    ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY

    Fields inherited from interface org.opengis.metadata.Identifier

    AUTHORITY_KEY, CODE_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

    CODESPACE_KEY, VERSION_KEY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Axis(String name, String abbreviation, byte direction, boolean angular, double unitScale)
    Creates a new axis.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the axis abbreviation.
    Returns the axis name.
    org.opengis.referencing.cs.AxisDirection
     
    double
     
    double
     
    org.opengis.referencing.cs.RangeMeaning
     
    javax.measure.Unit<?>
     
    (package private) Object
    Returns an arbitrary value suitable for string representation.
    (package private) final Axis
    withUnit(double scale)
    Returns the same axis but with a unit of measurement multiplied by the given scale.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.referencing.IdentifiedObject

    getAlias, getIdentifiers, getName, getRemarks, toWKT
  • Field Details

    • 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 to direction + 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 to direction + 3.
    • DIRECTIONS

      private static final org.opengis.referencing.cs.AxisDirection[] DIRECTIONS
      The axis directions in the order declared in the GEOGRAPHIC and PROJECTED arrays.
    • INDEX_OF_EAST

      static final int INDEX_OF_EAST
      Index of the axis having the east direction in GEOGRAPHIC and PROJECTED arrays.
      See Also:
    • name

      private final String name
      The coordinate system axis name.
    • abbreviation

      private final 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 Details

    • Axis

      private Axis(String name, String abbreviation, byte direction, boolean angular, double unitScale)
      Creates a new axis.
      Parameters:
      name - the coordinate system axis name
      abbreviation - the coordinate system axis abbreviation
      angular - whether the unit of measurement is degrees or metres.
      unitScale - the scale factor to apply on unit of measurement.
      north - whether the axis is oriented toward north or east.
  • Method Details

    • withUnit

      final Axis withUnit(double scale)
      Returns the same axis but with a unit of measurement multiplied by the given scale.
    • implementation

      Object implementation()
      Returns an arbitrary value suitable for string representation..
      Specified by:
      implementation in class Wrapper
      Returns:
      an arbitrary value suitable for string representation
    • getCode

      public String getCode()
      Returns the axis name..
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Specified by:
      getCode in class Wrapper
      Returns:
      the axis name
    • getAbbreviation

      public String getAbbreviation()
      Returns the axis abbreviation..
      Specified by:
      getAbbreviation in interface org.opengis.referencing.cs.CoordinateSystemAxis
      Returns:
      the axis abbreviation
    • getDirection

      public org.opengis.referencing.cs.AxisDirection getDirection()
      Specified by:
      getDirection in interface org.opengis.referencing.cs.CoordinateSystemAxis
    • getMinimumValue

      public double getMinimumValue()
      Specified by:
      getMinimumValue in interface org.opengis.referencing.cs.CoordinateSystemAxis
    • getMaximumValue

      public double getMaximumValue()
      Specified by:
      getMaximumValue in interface org.opengis.referencing.cs.CoordinateSystemAxis
    • getRangeMeaning

      public org.opengis.referencing.cs.RangeMeaning getRangeMeaning()
      Specified by:
      getRangeMeaning in interface org.opengis.referencing.cs.CoordinateSystemAxis
    • getUnit

      public javax.measure.Unit<?> getUnit()
      Specified by:
      getUnit in interface org.opengis.referencing.cs.CoordinateSystemAxis