Class DirectPositionView

All Implemented Interfaces:
org.opengis.geometry.coordinate.Position, org.opengis.geometry.DirectPosition
Direct Known Subclasses:
DirectPositionView.Double, DirectPositionView.Float

public abstract class DirectPositionView extends AbstractDirectPosition
A read-only direct position wrapping an array without performing any copy. This class shall be used for temporary objects only (it is not serializable for this reason).
Since:
0.5
Version:
1.0
  • Field Details

    • offset

      public int offset
      The index of the first value in the coordinates array. This field is non-final in order to allow the caller to move the view over an array of coordinates.
    • dimension

      final int dimension
      The number of valid coordinate values.
  • Constructor Details

    • DirectPositionView

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

    • getDimension

      public final int getDimension()
      Returns the dimension given at construction time.
      Returns:
      number of dimensions.