org.deegree.coverage.raster.io.jai
Class JAIRasterDataReader

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

public class JAIRasterDataReader
extends Object
implements RasterDataReader

This class implements a simple reader for raster files. It is based on Java Advanced Imaging and it returns RasterData objects. rb: This class needs heavy refactoring, maybe enable tiling for supporting files, than streams would not work any more, but using the renderOp would.

Version:
$Revision:10872 $, $Date:2008-04-01 15:41:48 +0200 (Tue, 01 Apr 2008) $
Author:
Oliver Tonnhofer, last edited by: $Author:otonnhofer $

Constructor Summary
JAIRasterDataReader(File file, RasterIOOptions options)
          Create a JAIRasterReader for given file
JAIRasterDataReader(InputStream stream, RasterIOOptions options)
          Create a JAIRasterReader for given stream
 
Method Summary
 void close()
          Removes the internal references to the loaded raster to allow garbage collection of the raster.
 void dispose()
           
 File file()
           
 int getColumns()
          Retruns the width of the raster associated with the reader
 RasterDataInfo getRasterDataInfo()
           
 int getRows()
          Retruns the height of the raster associated with the reader
 ByteBufferRasterData read()
          Reads data and returns a new RasterData object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAIRasterDataReader

public JAIRasterDataReader(File file,
                           RasterIOOptions options)
Create a JAIRasterReader for given file

Parameters:
file - file to read
options - holding information

JAIRasterDataReader

public JAIRasterDataReader(InputStream stream,
                           RasterIOOptions options)
Create a JAIRasterReader for given stream

Parameters:
stream - stream to read
options - holding information
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()
Retruns the width of the raster associated with the reader

Returns:
raster width

getRows

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

Returns:
raster height

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

public File file()
Returns:
the file containing the data.

dispose

public void dispose()

getRasterDataInfo

public RasterDataInfo getRasterDataInfo()
Returns:
the raster data info.


Copyright © 2011. All Rights Reserved.