org.geotoolkit.coverage.io
Class GridCoverageReadParam

Object
  extended by GridCoverageStoreParam
      extended by GridCoverageReadParam
All Implemented Interfaces:
Serializable

public class GridCoverageReadParam
extends GridCoverageStoreParam

Describes how a stream is to be decoded. Instances of this class are used to supply information to instances of GridCoverageReader.

Note: This class is conceptually equivalent to the ImageReadParam class provided in the standard Java library. The main difference is that GridCoverageReadParam works with geodetic coordinates while ImageReadParam works with pixel coordinates.

Since:
3.09
Version:
3.15
Author:
Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
See Also:
ImageReadParam, Serialized Form
Module:
coverage/geotk-coverageio (download)    View source code for this class

Constructor Summary
GridCoverageReadParam()
          Creates a new GridCoverageReadParam instance.
GridCoverageReadParam(GridCoverageStoreParam param)
          Creates a new GridCoverageReadParam instance initialized to the same values than the given parameters.
 
Method Summary
 void clear()
          Resets all parameters to their null value.
 int[] getDestinationBands()
          Returns the set of destination bands where data will be placed.
 void setDestinationBands(int... bands)
          Sets the indices of the destination bands where data will be placed.
 
Methods inherited from class GridCoverageStoreParam
getCoordinateReferenceSystem, getEnvelope, getResolution, getSourceBands, setCoordinateReferenceSystem, setEnvelope, setEnvelope, setResolution, setSourceBands, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridCoverageReadParam

public GridCoverageReadParam()
Creates a new GridCoverageReadParam instance. All properties are initialized to null. Callers must invoke setter methods in order to provide information about the way to decode the stream.


GridCoverageReadParam

public GridCoverageReadParam(GridCoverageStoreParam param)
Creates a new GridCoverageReadParam instance initialized to the same values than the given parameters.

Parameters:
param - The parameters to copy, or null if none.
Since:
3.15
Method Detail

clear

public void clear()
Resets all parameters to their null value.

Overrides:
clear in class GridCoverageStoreParam

getDestinationBands

public int[] getDestinationBands()
Returns the set of destination bands where data will be placed. By default, the value is null, indicating that all destination bands should be written in order.

Returns:
The set of destination bands where data will be placed, or null.
Since:
3.10
See Also:
ImageReadParam.getDestinationBands()

setDestinationBands

public void setDestinationBands(int... bands)
                         throws IllegalArgumentException
Sets the indices of the destination bands where data will be placed. A null value indicates that all destination bands will be used.

At the time of reading, an IllegalArgumentException will be thrown by the reader if a value larger than the largest destination band index has been specified or if the number of source bands and destination bands to be used differ.

Parameters:
bands - The destination bands, or null.
Throws:
IllegalArgumentException - If the given array is empty, or if it contains duplicated or negative values.
Since:
3.10
See Also:
ImageReadParam.setDestinationBands(int[])


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