Class DirectPositionView.Double
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.Double
- All Implemented Interfaces:
org.opengis.geometry.coordinate.Position, org.opengis.geometry.DirectPosition
- Enclosing class:
DirectPositionView
The double-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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns all coordinate values.doublegetOrdinate(int dim) Returns the coordinate at the given index.Methods inherited from class DirectPositionView
getDimensionMethods inherited from class AbstractDirectPosition
castOrCopy, equals, formatTo, getCoordinateReferenceSystem, getDirectPosition, hashCode, normalize, setLocation, setOrdinate, toStringMethods inherited from class FormattableObject
print, toString, toWKT
-
Field Details
-
coordinates
private final double[] 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
-
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:
getCoordinatein interfaceorg.opengis.geometry.DirectPosition- Overrides:
getCoordinatein classAbstractDirectPosition- Returns:
- all coordinate values.
-