Class DirectPositionView.Double

All Implemented Interfaces:
org.opengis.geometry.coordinate.Position, org.opengis.geometry.DirectPosition
Enclosing class:
DirectPositionView

public static final class DirectPositionView.Double extends DirectPositionView
The double-precision version of DirectPositionView.
  • Field Details

    • coordinates

      private final double[] coordinates
      The coordinate values. This is a direct reference to the array given to the constructor. The length of this array may be greater then the number of dimensions.
  • Constructor Details

    • Double

      public Double(double[] coordinates)
      Creates a new direct position wrapping the given array.
      Parameters:
      coordinates - the coordinate values.
    • Double

      public Double(double[] coordinates, int offset, int dimension)
      Creates a new direct position wrapping the given array.
      Parameters:
      coordinates - the coordinate values.
      offset - the first value index in the coordinates array.
      dimension - the number of valid coordinate values.
  • Method Details

    • getOrdinate

      public double getOrdinate(int dim)
      Returns the coordinate at the given index. This implementation does not check index validity, unless assertions are enabled.
      Parameters:
      dim - the dimension of the coordinate to get fetch.
      Returns:
      the coordinate value at the given dimension.
    • getCoordinate

      public double[] getCoordinate()
      Returns all coordinate values.
      Specified by:
      getCoordinate in interface org.opengis.geometry.DirectPosition
      Overrides:
      getCoordinate in class AbstractDirectPosition
      Returns:
      all coordinate values.