org.geotools.image.io.netcdf
Class NetcdfReadParam

java.lang.Object
  extended by javax.imageio.IIOParam
      extended by javax.imageio.ImageReadParam
          extended by org.geotools.image.io.GeographicImageReadParam
              extended by org.geotools.image.io.netcdf.NetcdfReadParam

Deprecated. Having band dimension in this class is a problem because it make difficult to implement NetcdfImageReader.getNumBands(int) in a reliable way. The information contained in this class need to move in some interface or in a FileImageReaderND superclass (common to NetCDF and HDF readers). The AxisType enumeration needs to be replaced by something neutral from GeoAPI.

public class NetcdfReadParam
extends GeographicImageReadParam

Default parameters for NetcdfImageReader.

Since:
2.4
Version:
$Id: NetcdfReadParam.java 30680 2008-06-13 10:22:22Z acuster $
Author:
Martin Desruisseaux

Field Summary
 
Fields inherited from class org.geotools.image.io.GeographicImageReadParam
DEFAULT_PALETTE_NAME
 
Fields inherited from class javax.imageio.ImageReadParam
canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize
 
Fields inherited from class javax.imageio.IIOParam
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset
 
Constructor Summary
NetcdfReadParam(javax.imageio.ImageReader reader)
          Deprecated. Creates a new, initially empty, set of parameters.
 
Method Summary
protected  int getBandDimension(ucar.nc2.dataset.VariableEnhanced variable)
          Deprecated. Returns the dimension to assign to bands for the specified variable.
 ucar.nc2.constants.AxisType[] getBandDimensionTypes()
          Deprecated. Returns the dimension assigned to bands.
 int getSliceIndice(ucar.nc2.constants.AxisType axis)
          Deprecated. Returns the indice to set at the dimension of the specified axis.
 void setBandDimensionTypes(ucar.nc2.constants.AxisType... types)
          Deprecated. Assigns the dimension of the specified types to bands.
 void setSliceIndice(ucar.nc2.constants.AxisType dimension, int indice)
          Deprecated. Sets the indice for the dimension of the specified axis.
 
Methods inherited from class org.geotools.image.io.GeographicImageReadParam
getPaletteName, getVisibleBand, setPaletteName, setVisibleBand, toString
 
Methods inherited from class javax.imageio.ImageReadParam
canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setDestinationType, setSourceProgressivePasses, setSourceRenderSize
 
Methods inherited from class javax.imageio.IIOParam
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setSourceBands, setSourceRegion, setSourceSubsampling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetcdfReadParam

public NetcdfReadParam(javax.imageio.ImageReader reader)
Deprecated. 
Creates a new, initially empty, set of parameters.

Parameters:
reader - The reader for which this parameter block is created
Method Detail

getBandDimension

protected int getBandDimension(ucar.nc2.dataset.VariableEnhanced variable)
Deprecated. 
Returns the dimension to assign to bands for the specified variable. The default implementation returns the last dimension corresponding to one of the types specified to setBandDimensionTypes(ucar.nc2.constants.AxisType...). Users can override this method if the bands should be assigned from a dimension computed differently.

Example: For a NetCDF variable having dimensions in the (t,z,y,x) order (as in CF convention), if the height and pressure types have been assigned to bands, then this method will returns the index of the z dimension, i.e. 1.

Parameters:
variable - The variable for which we want to determine the dimension to assign to bands.
Returns:
The dimension assigned to bands, or -1 if none.

getBandDimensionTypes

public ucar.nc2.constants.AxisType[] getBandDimensionTypes()
Deprecated. 
Returns the dimension assigned to bands. This method returns the values given to the last call to setBandDimensionTypes(ucar.nc2.constants.AxisType...), or null if none.


setBandDimensionTypes

public void setBandDimensionTypes(ucar.nc2.constants.AxisType... types)
Deprecated. 
Assigns the dimension of the specified types to bands. For example in a NetCDF variable having (t,y,x) dimensions, it may be useful to treat the t dimension as bands. After invoking this method with the time value, users can select a time through the standard IIOParam.setSourceBands(int[]) API.

More than one type may be specified if they should be considered as synonymous. For example in order to assign the z dimension to bands, it may be necessary to specify both the height and pressure types.

Parameters:
type - The types of dimension to assign to bands.

getSliceIndice

public int getSliceIndice(ucar.nc2.constants.AxisType axis)
Deprecated. 
Returns the indice to set at the dimension of the specified axis. This is relevant only for n-dimensional data set where n>2. This method returns the last value set by setSliceIndice(ucar.nc2.constants.AxisType, int).

Parameters:
dimension - The axis type (typically height or time).
Returns:
The indice to set at the dimension of the specified axis (0 by default).

setSliceIndice

public void setSliceIndice(ucar.nc2.constants.AxisType dimension,
                           int indice)
Deprecated. 
Sets the indice for the dimension of the specified axis. This is relevant only for n-dimensional data set where n>2. For example in 4-D data set with (x,y,z,t) axis, those indices may be used by image readers for z and t dimensions.

The default value is 0 for all cases. This means that for the above-cited 4-D data set, only the image at the first time (t=0) and first altitude (z=0) is selected.

Parameters:
dimension - The axis type (typically height or time).
indice - The indice as a positive value.


Copyright © 1996-2010 Geotools. All Rights Reserved.