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
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.referencing.DirectPositionView
DirectPositionView.Double, DirectPositionView.Float
-
Field Summary
FieldsFields inherited from class org.apache.sis.internal.referencing.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 TypeMethodDescriptiondouble
getOrdinate
(int dim) Returns the coordinate at the given index.Methods inherited from class org.apache.sis.internal.referencing.DirectPositionView
getDimension
Methods inherited from class org.apache.sis.geometry.AbstractDirectPosition
castOrCopy, equals, formatTo, getCoordinate, getCoordinateReferenceSystem, getDirectPosition, hashCode, normalize, setLocation, setOrdinate, toString
Methods inherited from class org.apache.sis.io.wkt.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.
-