deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.coverage.raster.io
Interface RasterReader

All Known Implementing Classes:
CacheRasterReader, GridFileReader, GridReader, IIORasterReader, JAIRasterReader, SplittedBlobReader, TileOffsetReader, XYZReader

public interface RasterReader

This interface is for abstraction of the raster loading handling.

Version:
$Revision: 21740 $
Author:
Oliver Tonnhofer, last edited by: $Author: rbezema $

Method Summary
 boolean canLoad(File filename)
          Check if the raster reader is able to read the given raster file.
 boolean canReadTiles()
          should return true if the given reader can easily read tiles,without consuming much more memory than needed.
 void dispose()
          Signals the reader that it should try to dispose all in memory data.
 File file()
           
 String getDataLocationId()
           
 RasterGeoReference getGeoReference()
           
 int getHeight()
           
 RasterDataInfo getRasterDataInfo()
           
 Set<String> getSupportedFormats()
           
 int getWidth()
           
 AbstractRaster load(File filename, RasterIOOptions options)
          Read the given raster file into an abstract raster.
 AbstractRaster load(InputStream stream, RasterIOOptions options)
          Read the given input stream into an abstract raster.
 BufferResult read(RasterRect rect, ByteBuffer result)
           
 boolean shouldCreateCacheFile()
           
 

Method Detail

load

AbstractRaster load(File filename,
                    RasterIOOptions options)
                    throws IOException
Read the given raster file into an abstract raster.

Parameters:
filename -
options -
Returns:
the loaded raster
Throws:
IOException - may be thrown when there is a problem with reading the raster.

load

AbstractRaster load(InputStream stream,
                    RasterIOOptions options)
                    throws IOException
Read the given input stream into an abstract raster.

Parameters:
stream -
options -
Returns:
the loaded raster
Throws:
IOException - may be thrown when there is a problem with reading the raster.

canLoad

boolean canLoad(File filename)
Check if the raster reader is able to read the given raster file.

Parameters:
filename -
Returns:
true if the class can read the raster

getSupportedFormats

Set<String> getSupportedFormats()
Returns:
a Set of (image) formats mime/types the implementation is able to read.

shouldCreateCacheFile

boolean shouldCreateCacheFile()
Returns:
true if a cache file should be created for the read raster.

file

File file()
Returns:
the file from which the raster was read.

getWidth

int getWidth()
Returns:
the width (in pixels) of the read raster

getHeight

int getHeight()
Returns:
the height (in pixels) of the read raster

getGeoReference

RasterGeoReference getGeoReference()
Returns:
the geo reference of the read raster

read

BufferResult read(RasterRect rect,
                  ByteBuffer result)
                  throws IOException
Parameters:
rect - to read.
result - to store the result in
Returns:
the read buffer and its domain
Throws:
IOException

getRasterDataInfo

RasterDataInfo getRasterDataInfo()
Returns:
the raster data info

canReadTiles

boolean canReadTiles()
should return true if the given reader can easily read tiles,without consuming much more memory than needed.

Returns:
true if the reader can easily read tiles.

getDataLocationId

String getDataLocationId()
Returns:
a String which identifies this reader for used the data source, for example the file name, or an url.

dispose

void dispose()
Signals the reader that it should try to dispose all in memory data.


deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>