org.opengis.coverage.grid
Interface GridCoordinates

All Superinterfaces:
Cloneable
All Known Implementing Classes:
GeneralGridCoordinates, GeneralGridCoordinates.Immutable, GridCoordinates2D

@UML(identifier="CV_GridCoordinates",
     specification=ISO_19123)
public interface GridCoordinates
extends Cloneable

Holds the set of grid coordinates that specifies the location of the grid point within the grid.

Since:
GeoAPI 2.1
Author:
Martin Schouwenburg, Wim Koolhoven, Martin Desruisseaux (IRD)

Method Summary
 int getCoordinateValue(int dimension)
          Returns the coordinate value at the specified dimension.
 int[] getCoordinateValues()
          Returns one integer value for each dimension of the grid.
 int getDimension()
          Returns the number of dimensions.
 void setCoordinateValue(int dimension, int value)
          Sets the coordinate value at the specified dimension (optional operation).
 
Methods inherited from interface Cloneable
clone
 

Method Detail

getDimension

@Extension
int getDimension()
Returns the number of dimensions. This method is equivalent to getCoordinateValues().length. It is provided for efficienty.

Returns:
The number of dimensions.

getCoordinateValues

@UML(identifier="coordValues",
     obligation=MANDATORY,
     specification=ISO_19123)
int[] getCoordinateValues()
Returns one integer value for each dimension of the grid. The ordering of these coordinate values shall be the same as that of the elements of Grid#getAxisNames. The value of a single coordinate shall be the number of offsets from the origin of the grid in the direction of a specific axis.

Returns:
A copy of the coordinates. Changes in the returned array will not be reflected back in this GridCoordinates object.

getCoordinateValue

@Extension
int getCoordinateValue(int dimension)
                       throws IndexOutOfBoundsException
Returns the coordinate value at the specified dimension. This method is equivalent to getCoordinateValues()[i]. It is provided for efficienty.

Parameters:
dimension - The dimension for which to obtain the coordinate value.
Returns:
The coordinate value at the given dimension.
Throws:
IndexOutOfBoundsException - If the given index is negative or is equals or greater than the grid dimension.

setCoordinateValue

@Extension
void setCoordinateValue(int dimension,
                                  int value)
                        throws IndexOutOfBoundsException,
                               UnsupportedOperationException
Sets the coordinate value at the specified dimension (optional operation).

Parameters:
dimension - The dimension for which to set the coordinate value.
value - The new value.
Throws:
IndexOutOfBoundsException - If the given index is negative or is equals or greater than the grid dimension.
UnsupportedOperationException - if this grid coordinates is not modifiable.


Copyright © 1996-2014 Geotools. All Rights Reserved.