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

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

public class IIORasterReader
extends Object
implements RasterReader

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
IIORasterReader()
           
 
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 file, 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 buffer)
           
 boolean shouldCreateCacheFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IIORasterReader

public IIORasterReader()
Method Detail

canLoad

public boolean canLoad(File filename)
Description copied from interface: RasterReader
Check if the raster reader is able to read the given raster file.

Specified by:
canLoad in interface RasterReader
Returns:
true if the class can read the raster

load

public AbstractRaster load(File file,
                           RasterIOOptions options)
                    throws IOException
Description copied from interface: RasterReader
Read the given raster file into an abstract raster.

Specified by:
load in interface RasterReader
Returns:
the loaded raster
Throws:
IOException - may be thrown when there is a problem with reading the raster.

load

public AbstractRaster load(InputStream stream,
                           RasterIOOptions options)
                    throws IOException
Description copied from interface: RasterReader
Read the given input stream into an abstract raster.

Specified by:
load in interface RasterReader
Returns:
the loaded raster
Throws:
IOException - may be thrown when there is a problem with reading the raster.

getSupportedFormats

public Set<String> getSupportedFormats()
Specified by:
getSupportedFormats in interface RasterReader
Returns:
a Set of (image) formats mime/types the implementation is able to read.

file

public File file()
Specified by:
file in interface RasterReader
Returns:
the file from which the raster was read.

shouldCreateCacheFile

public boolean shouldCreateCacheFile()
Specified by:
shouldCreateCacheFile in interface RasterReader
Returns:
true if a cache file should be created for the read raster.

getGeoReference

public RasterGeoReference getGeoReference()
Specified by:
getGeoReference in interface RasterReader
Returns:
the geo reference of the read raster

getHeight

public int getHeight()
Specified by:
getHeight in interface RasterReader
Returns:
the height (in pixels) of the read raster

getWidth

public int getWidth()
Specified by:
getWidth in interface RasterReader
Returns:
the width (in pixels) of the read raster

read

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

getRasterDataInfo

public RasterDataInfo getRasterDataInfo()
Specified by:
getRasterDataInfo in interface RasterReader
Returns:
the raster data info

canReadTiles

public boolean canReadTiles()
Description copied from interface: RasterReader
should return true if the given reader can easily read tiles,without consuming much more memory than needed.

Specified by:
canReadTiles in interface RasterReader
Returns:
true if the reader can easily read tiles.

getDataLocationId

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

dispose

public void dispose()
Description copied from interface: RasterReader
Signals the reader that it should try to dispose all in memory data.

Specified by:
dispose in interface RasterReader


Copyright © 2011. All Rights Reserved.