Class DirectPositionView
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.geometry.AbstractDirectPosition
org.apache.sis.internal.referencing.DirectPositionView
- All Implemented Interfaces:
org.opengis.geometry.coordinate.Position
,org.opengis.geometry.DirectPosition
- Direct Known Subclasses:
DirectPositionView.Double
,DirectPositionView.Float
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The double-precision version ofDirectPositionView
.static final class
The single-precision version ofDirectPositionView
. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDirectPositionView
(int offset, int dimension) Creates a new direct position wrapping the given array. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
Returns the dimension given at construction time.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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.geometry.DirectPosition
getOrdinate
-
Field Details
-
offset
public int offsetThe 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 dimensionThe 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.
-