org.geotoolkit.referencing.cs
Interface DiscreteCoordinateSystemAxis

All Known Implementing Classes:
NetcdfAxis

public interface DiscreteCoordinateSystemAxis

Interface for coordinate systems axes having a finite number of discrete ordinate values. This interface is sometime used for axes associated to a grid coverage, for example in the NetCDF file format. Instances can be created by DiscreteReferencingFactory.

Note: The services provided by DiscreteCoordinateSystemAxis are redundant with the service provided by the grid to CRS transform associated with grid geometries. However this interface is defined as a more convenient way to access irregular ordinate values on independent axes, for example a list of time instants on the temporal axis.

Since:
3.15
Version:
3.15
Author:
Martin Desruisseaux (Geomatys)
See Also:
CoordinateSystemAxis, GridGeometry.getGridToCRS()
Module:
coverage/geotk-coverage (download)    View source code for this class

Method Summary
 Comparable<?> getOrdinateAt(int index)
          Returns the ordinate value at the given index.
 Range<?> getOrdinateRangeAt(int index)
          Returns the range of ordinate values at the given index.
 int length()
          Returns the number of ordinate values.
 

Method Detail

length

int length()
Returns the number of ordinate values.

Returns:
The number of ordinate values.

getOrdinateAt

Comparable<?> getOrdinateAt(int index)
                            throws IndexOutOfBoundsException
Returns the ordinate value at the given index. The returned value is typically an instance of Number or Date.

Parameters:
index - The index at which to return the ordinate value.
Returns:
The ordinate value at the given index as a Number, Date or String.
Throws:
IndexOutOfBoundsException - If the given index is outside the [0 … length-1] range.

getOrdinateRangeAt

Range<?> getOrdinateRangeAt(int index)
                            throws IndexOutOfBoundsException,
                                   UnsupportedOperationException
Returns the range of ordinate values at the given index. The range minimum and range maximum are the values where the underlying grid element switches from "belonging to" the ordinate value referenced by index±1 to "belonging to" the ordinate value referenced by index.

The value returned by getOrdinateAt(int) is typically in the middle of the range returned by this method for the same index, but not necessarily.

Parameters:
index - The index at which to return the range of ordinate values.
Returns:
The range of ordinate values at the given index.
Throws:
IndexOutOfBoundsException - If the given index is outside the [0 … length-1] range.
UnsupportedOperationException - if the axis is not numeric.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.