Class DirectPositionView.Float
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.geometry.AbstractDirectPosition
org.apache.sis.internal.referencing.DirectPositionView
org.apache.sis.internal.referencing.DirectPositionView.Float
- All Implemented Interfaces:
org.opengis.geometry.coordinate.Position, org.opengis.geometry.DirectPosition
- Enclosing class:
DirectPositionView
The single-precision version of
DirectPositionView.- Since:
- 0.5
- Version:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class DirectPositionView
DirectPositionView.Double, DirectPositionView.Float -
Field Summary
FieldsFields inherited from class DirectPositionView
dimension, offset -
Constructor Summary
ConstructorsConstructorDescriptionFloat(float[] coordinates, int offset, int dimension) Creates a new direct position wrapping the given array. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetOrdinate(int dim) Returns the coordinate at the given index.Methods inherited from class DirectPositionView
getDimensionMethods inherited from class AbstractDirectPosition
castOrCopy, equals, formatTo, getCoordinate, getCoordinateReferenceSystem, getDirectPosition, hashCode, normalize, setLocation, setOrdinate, toStringMethods inherited from class FormattableObject
print, toString, toWKT
-
Field Details
-
coordinates
private final float[] coordinatesThe 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
-
Float
public Float(float[] 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.
-