org.deegree.coverage.raster.data
Class RasterDataFactory

java.lang.Object
  extended by org.deegree.coverage.raster.data.RasterDataFactory

public class RasterDataFactory
extends Object

This class creates RasterData objects with a given interleaving type. This factory creates RasterData objects based on ByteBufferRasterData.

Version:
$Revision:11404 $, $Date:2008-04-23 15:38:27 +0200 (Mi, 23 Apr 2008) $
Author:
Oliver Tonnhofer, last edited by: $Author:rbezema $

Constructor Summary
RasterDataFactory()
           
 
Method Summary
static ByteBufferRasterData createRasterData(int width, int height, BandType[] bands, DataType dataType, InterleaveType interleaveType, boolean addToCache)
          Creates a RasterData object object with given size, number of bands, data type and interleaving
static ByteBufferRasterData createRasterData(int width, int height, BandType[] bands, DataType dataType, InterleaveType interleaveType, RasterGeoReference geoRef, ByteBuffer byteBuffer, boolean createCacheFile, String cacheId)
          Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray.
static ByteBufferRasterData createRasterData(int width, int height, BandType[] bands, DataType dataType, InterleaveType interleaveType, RasterReader reader, boolean addToCache)
          Creates a RasterData object object with given size, number of bands, data type and interleaving
static ByteBufferRasterData createRasterData(int width, int height, DataType dataType, boolean addToCache)
          Creates a pixel-interleaved RasterData object with given size and data type
static ByteBufferRasterData createRasterData(int width, int height, RasterDataInfo rdi, RasterGeoReference geoRef, ByteBuffer byteBuffer, boolean createCacheFile, String cacheId)
          Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray.
static ByteBufferRasterData createRasterData(int width, int height, RasterDataInfo rdi, RasterGeoReference geoRef, ByteBuffer byteBuffer, boolean createCacheFile, String cacheId, RasterIOOptions options)
          Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray.
static ByteBufferRasterData createRasterData(int width, int height, RasterDataInfo dataInfo, RasterReader reader, boolean addToCache)
          Creates a RasterData object object with given size, number of bands, data type and interleaving.
static ByteBufferRasterData createRasterData(RasterRect view, RasterDataInfo rdi, RasterGeoReference geoRef, ByteBuffer byteBuffer, boolean createCacheFile, String cacheId, RasterIOOptions options)
          Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray.
static ByteBufferRasterData createRasterData(RasterRect view, RasterDataInfo dataInfo, RasterReader reader, boolean addToCache, RasterIOOptions options)
          Creates a RasterData object object with given view, number of bands, data type and interleaving.
static TiledRasterData createTiledRasterData(GridReader reader, RasterIOOptions options)
          Encapsulates a Grid of Raster data as a new Raster data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterDataFactory

public RasterDataFactory()
Method Detail

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    DataType dataType,
                                                    boolean addToCache)
Creates a pixel-interleaved RasterData object with given size and data type

Parameters:
width - width of the raster
height - height of the raster
dataType - data type for samples
addToCache - if the reader should be added to the cache (almost always should be true).
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    BandType[] bands,
                                                    DataType dataType,
                                                    InterleaveType interleaveType,
                                                    boolean addToCache)
Creates a RasterData object object with given size, number of bands, data type and interleaving

Parameters:
width - width of the raster
height - height of the raster
bands - number and type of the bands
dataType - data type for samples
interleaveType - interleaving type for the raster
addToCache - if the reader should be added to the cache (almost always should be true).
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    BandType[] bands,
                                                    DataType dataType,
                                                    InterleaveType interleaveType,
                                                    RasterReader reader,
                                                    boolean addToCache)
Creates a RasterData object object with given size, number of bands, data type and interleaving

Parameters:
width - width of the raster
height - height of the raster
bands - number and type of the bands
dataType - data type for samples
interleaveType - interleaving type for the raster
reader - to get the data from, maybe null
addToCache - if the reader should be added to the cache (almost always should be true).
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    RasterDataInfo dataInfo,
                                                    RasterReader reader,
                                                    boolean addToCache)
Creates a RasterData object object with given size, number of bands, data type and interleaving. The view will be 0, 0, width, height, the default raster cache location will be used.

Parameters:
width - width of the raster
height - height of the raster
dataInfo - defining the bands, datatype and interleave type.
reader - to get the data from, maybe null
addToCache - if the reader should be added to the cache (almost always should be true).
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(RasterRect view,
                                                    RasterDataInfo dataInfo,
                                                    RasterReader reader,
                                                    boolean addToCache,
                                                    RasterIOOptions options)
Creates a RasterData object object with given view, number of bands, data type and interleaving.

Parameters:
view - valid for the raster data.
dataInfo - defining the bands, datatype and interleave type.
reader - to get the data from, maybe null
addToCache - if the reader should be added to the cache (almost always should be true).
options - containing information about the raster cache directory.
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    BandType[] bands,
                                                    DataType dataType,
                                                    InterleaveType interleaveType,
                                                    RasterGeoReference geoRef,
                                                    ByteBuffer byteBuffer,
                                                    boolean createCacheFile,
                                                    String cacheId)
Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray. A cachereader will be created.

Parameters:
width - width of the raster
height - height of the raster
bands - number and type of the bands
dataType - data type for samples
interleaveType - interleaving type for the raster
geoRef - needed for the reader.
byteBuffer - on which the memory reader will operate upon.
createCacheFile - true if a cache file should back the data
cacheId - the name of the cache file to use in the default RasterCache.
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    RasterDataInfo rdi,
                                                    RasterGeoReference geoRef,
                                                    ByteBuffer byteBuffer,
                                                    boolean createCacheFile,
                                                    String cacheId)
Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray. A cachereader will be created.

Parameters:
width - width of the raster
height - height of the raster
rdi - containing the number of bands, the data type and the interleave type.
geoRef - needed for the reader.
byteBuffer - on which the memory reader will operate upon.
createCacheFile - true if a cache file should back the data
cacheId - the name of the cache file to use in the default RasterCache.
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(int width,
                                                    int height,
                                                    RasterDataInfo rdi,
                                                    RasterGeoReference geoRef,
                                                    ByteBuffer byteBuffer,
                                                    boolean createCacheFile,
                                                    String cacheId,
                                                    RasterIOOptions options)
Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray. A cachereader will be created.

Parameters:
width - width of the raster
height - height of the raster
rdi - containing the number of bands, the data type and the interleave type.
geoRef - needed for the reader.
byteBuffer - on which the memory reader will operate upon.
createCacheFile - true if a cache file should back the data
cacheId - the name of the cache file to use in the default RasterCache.
options - which can be used to get the cache data from.
Returns:
new RasterData

createRasterData

public static ByteBufferRasterData createRasterData(RasterRect view,
                                                    RasterDataInfo rdi,
                                                    RasterGeoReference geoRef,
                                                    ByteBuffer byteBuffer,
                                                    boolean createCacheFile,
                                                    String cacheId,
                                                    RasterIOOptions options)
Creates a RasterData object object with given size, number of bands, data type and interleaving filled with the given ByteArray. A cachereader will be created.

Parameters:
view -
rdi - containing the number of bands, the data type and the interleave type.
geoRef - needed for the reader.
byteBuffer - on which the memory reader will operate upon.
createCacheFile - true if a cache file should back the data
cacheId - the name of the cache file to use in the default RasterCache.
options - which can be used to get the cache data from.
Returns:
new RasterData

createTiledRasterData

public static TiledRasterData createTiledRasterData(GridReader reader,
                                                    RasterIOOptions options)
Encapsulates a Grid of Raster data as a new Raster data object. This tiled raster data object cascades the pixel operations for the underlying raster data grid.

Parameters:
reader - to be used.
options - holding information on the io settings.
Returns:
a new TiledRasterData.


Copyright © 2011. All Rights Reserved.