Class 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 the GEOGRAPHIC and PROJECTED 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 in GEOGRAPHIC and PROJECTED 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 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​(java.lang.String name, java.lang.String abbreviation, byte direction, boolean angular, double unitScale)
      Creates a new axis.
    • 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 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.
      • 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 name
        abbreviation - the coordinate system axis abbreviation
        north - 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 class Wrapper
      • getCode

        public java.lang.String getCode()
        {@return the axis name}.
        Specified by:
        getCode in interface org.opengis.metadata.Identifier
        Specified by:
        getCode in class Wrapper
      • getAbbreviation

        public java.lang.String getAbbreviation()
        {@return the axis abbreviation}.
        Specified by:
        getAbbreviation in interface org.opengis.referencing.cs.CoordinateSystemAxis
      • 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