Package org.apache.sis.coverage.grid
Class GridCoordinatesView
java.lang.Object
org.apache.sis.coverage.grid.GridCoordinatesView
A view over the low or high grid envelope coordinates.
This is not a general-purpose grid coordinates since it assumes a
GridExtent
coordinates layout.
Upcoming API generalization:
this class may implement the
GridCoordinates
interface in a future Apache SIS version.
This is pending GeoAPI update.- Since:
- 1.0
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long[]
A reference to the coordinate array of the enclosing grid envelope.private final int
Index of the first value in thecoordinates
array. -
Constructor Summary
ConstructorsConstructorDescriptionGridCoordinatesView
(long[] coordinates, int offset) Creates a new view over the low or high coordinates. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Compares this grid coordinates with the specified object for equality.final long
getCoordinateValue
(int index) Returns the coordinate value for the specified dimension.final long[]
Returns all coordinate values.final int
Returns the number of dimension.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this grid coordinates for debugging purpose.
-
Field Details
-
coordinates
private final long[] coordinatesA reference to the coordinate array of the enclosing grid envelope. -
offset
private final int offsetIndex of the first value in thecoordinates
array. This is 0 for low values, orgetDimension()
for high values.
-
-
Constructor Details
-
GridCoordinatesView
GridCoordinatesView(long[] coordinates, int offset) Creates a new view over the low or high coordinates.
-
-
Method Details
-
getDimension
public final int getDimension()Returns the number of dimension. -
getCoordinateValues
public final long[] getCoordinateValues()Returns all coordinate values. -
getCoordinateValue
public final long getCoordinateValue(int index) Returns the coordinate value for the specified dimension. -
toString
Returns a string representation of this grid coordinates for debugging purpose. -
hashCode
public final int hashCode()Returns a hash code value for this object. -
equals
Compares this grid coordinates with the specified object for equality.
-