Class CoordinateSystem<P extends Position>

    • Constructor Detail

      • CoordinateSystem

        public CoordinateSystem​(CoordinateSystemAxis... axes)
        Constructs a CoordinateSystem.

        CoordinateSystems are characterized by their CoordinateSystemAxes.

        Parameters:
        axes - the sequence (at least two) of its CoordinateSystems.
        Throws:
        IllegalArgumentException - when less than two axes are specified, or when an argument is null.
    • Method Detail

      • getPositionClass

        public abstract Class<P> getPositionClass()
      • getAxisDirections

        public List<CoordinateSystemAxisDirection> getAxisDirections()
        Returns a list of all the directions of this systems
        Returns:
        a List of Coordinate system axis directions.
      • getAxisNormalOrder

        public List<Integer> getAxisNormalOrder()
        Returns the normal order value for the axes of this systems in the order that the axes have been defined for this system.
        Returns:
        a List of Coordinate system axis directions.
      • getCoordinateDimension

        public int getCoordinateDimension()
        Returns the coordinate dimension, i.e. the number of axes in this coordinate system.
        Returns:
      • getAxisIndex

        public int getAxisIndex​(CoordinateSystemAxis axis)
        Returns the position of the specified CoordinateSystemAxis in this CoordinateSystem, or -1 if it is not an axis of this instance.
        Parameters:
        axis -
        Returns:
      • getAxisForComponentIndex

        public CoordinateSystemAxis getAxisForComponentIndex​(int i)
        Return the axis that corresponds to the i-th element in the coordinates for a Position in this CoordinateSystem.
        Parameters:
        i - the 0-base index for a coordinate
        Returns:
        the axis
        Throws:
        IndexOutOfBoundsException - if i > getCoordinateDimension() - 1
      • getAxisUnit

        public Unit getAxisUnit​(int index)
        Returns the Unit of the axis at the specified position.
        Parameters:
        index -
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • merge

        public abstract CoordinateSystem<?> merge​(OneDimensionCoordinateSystem<?> coordinateSystem)
        Create a coordinate system that merges this instance with the specified system
        Parameters:
        coordinateSystem - the system to merge with
        Returns:
        a new CoordinateSystem
        Throws:
        UnsupportedOperationException - if no supported coordinate system can represent the merge
      • extend

        public abstract CoordinateSystem<?> extend​(CoordinateSystemAxis axis)
        Create a new coordinate system with the axes of this system plus the specified axis
        Parameters:
        axis - the additional axis
        Returns:
        a new CoordinateSystem
        Throws:
        UnsupportedOperationException - if no supported coordinate system can contain the axes.
      • hasZ

        public abstract boolean hasZ()
        Does the coordinate system have a Vertical or Z axis?
        Returns:
      • hasM

        public abstract boolean hasM()
        does the system have a Measure axis?
        Returns: