Class OrderedAxisCRSAuthorityFactory

    • Field Detail

      • directionRanks

        protected final int[] directionRanks
        The rank to be given to each axis direction. The rank is stored at the indice corresponding to the direction ordinal value.
      • forceStandardDirections

        protected final boolean forceStandardDirections
        true if this authority factory should also force the axis to their standard direction. For example if true, then axis with increasing values toward South will be converted to axis with increasing values toward North. The default value is false.
        See Also:
      • forceStandardUnits

        protected final boolean forceStandardUnits
        true if this authority factory should also force all angular units to decimal degrees and linear units to meters. The default value is false.
        See Also:
    • Method Detail

      • booleanValue

        protected static boolean booleanValue​(Hints userHints,
                                              Hints.Key key)
        Returns the boolean value for the specified hint.
      • computeDirectionRanks

        protected static int[] computeDirectionRanks​(AxisDirection... axisOrder)
                                              throws IllegalArgumentException
        Computes the rank for every direction in the specified. The rank is stored in an array at the indice corresponding to the direction ordinal value. This method is used by constructors for computing the directionRanks field.
        IllegalArgumentException - If at least two axis directions are colinear.
      • completeHints

        protected void completeHints()
        Completes the set of hints according the value currently set in this object. This method is invoked by constructors only.
      • compare

        public int compare​(CoordinateSystemAxis axis1,
                           CoordinateSystemAxis axis2)
        Compares two axis for order. This method is invoked automatically by the replace method for ordering the axis in a coordinate system. The default implementation orders the axis according their direction, using the direction table given at construction time (see also the class description). Subclasses may override this method if they want to define a more sophesticated axis ordering.
        Specified by:
        compare in interface Comparator<CoordinateSystemAxis>
        axis1 - The first axis to compare.
        axis2 - The second axis to compare.
        A negative integer if axis1 should appears before axis2, or a positive number if axis2 should appears before axis1, or 0 if the two axis are unordered one relative to the other.
      • replace

        public Unit<?> replace​(Unit<?> units)
        Replaces the specified unit, if applicable. This method is invoked automatically by the TransformedAuthorityFactory.replace(CoordinateSystem) method. The default implementation replaces the unit only if the FORCE_STANDARD_AXIS_UNITS hint was specified as TRUE at construction time. In such case, the default substitution table is:

        • Any linear units converted to meters
        • Radians and grades converted to decimal degrees

        This default substitution table may be expanded in future GeoTools versions.

        replace in class TransformedAuthorityFactory
        units - The units to replace.
        The new units, or units if no change were needed.