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
.-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns all coordinate values.double
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, 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 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:
getCoordinate
in interfaceorg.opengis.geometry.DirectPosition
- Overrides:
getCoordinate
in classAbstractDirectPosition
- Returns:
- all coordinate values.
-