org.deegree.coverage.raster.io.imageio
Class IIORasterDataReader

java.lang.Object
  extended by org.deegree.coverage.raster.io.imageio.IIORasterDataReader
All Implemented Interfaces:
RasterDataReader

public class IIORasterDataReader
extends Object
implements RasterDataReader

Version:
$Revision: 31653 $, $Date: 2011-08-25 13:19:01 +0200 (Thu, 25 Aug 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: aschmitz $

Constructor Summary
IIORasterDataReader(File file, RasterIOOptions options, int imageIndex)
          Create a IIORasterDataReader for given file
IIORasterDataReader(InputStream stream, RasterIOOptions options, int imageIndex)
          Create a IIORasterDataReader for given stream
 
Method Summary
 void close()
          Removes the internal references to the loaded raster to allow garbage collection of the raster.
 void dispose()
           
protected  File file()
          needed by the raster reader,
 int getColumns()
          Returns the height of the raster associated with the reader
protected  IIOMetadata getMetaData()
           
 RasterDataInfo getRasterDataInfo()
           
 boolean getReadTiles()
           
 int getRows()
          Returns the height of the raster associated with the reader
 ByteBufferRasterData read()
          Reads data and returns a new RasterData object
 BufferResult read(RasterRect rect, ByteBuffer resultBuffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IIORasterDataReader

public IIORasterDataReader(File file,
                           RasterIOOptions options,
                           int imageIndex)
Create a IIORasterDataReader for given file

Parameters:
file - file to read
options - with values.

IIORasterDataReader

public IIORasterDataReader(InputStream stream,
                           RasterIOOptions options,
                           int imageIndex)
Create a IIORasterDataReader for given stream

Parameters:
stream - stream to read
options - with values
Method Detail

read

public ByteBufferRasterData read()
Reads data and returns a new RasterData object

Specified by:
read in interface RasterDataReader
Returns:
new RasterData

getColumns

public int getColumns()
Returns the height of the raster associated with the reader

Returns:
raster height

getRows

public int getRows()
Returns the height of the raster associated with the reader

Returns:
raster height

getMetaData

protected IIOMetadata getMetaData()
Returns:
the raw metadata of the raster

getRasterDataInfo

public RasterDataInfo getRasterDataInfo()
Returns:
the raster data info object describing the data to be read.

close

public void close()
Removes the internal references to the loaded raster to allow garbage collection of the raster.

Specified by:
close in interface RasterDataReader

file

protected File file()
needed by the raster reader,

Returns:
will return the file if any.

read

public BufferResult read(RasterRect rect,
                         ByteBuffer resultBuffer)
Parameters:
rect -
resultBuffer -
Returns:
the buffer result containing the result buffer (instantiated if the given one was null) and the rect it is valid for.

getReadTiles

public boolean getReadTiles()
Returns:
true if random access is easy for the image io reader.

dispose

public void dispose()


Copyright © 2011. All Rights Reserved.