org.deegree.coverage.raster.data.nio
Class LineInterleavedRasterData

java.lang.Object
  extended by org.deegree.coverage.raster.data.nio.ByteBufferRasterData
      extended by org.deegree.coverage.raster.data.nio.LineInterleavedRasterData
All Implemented Interfaces:
RasterData

public class LineInterleavedRasterData
extends ByteBufferRasterData

This class implements a line-interleaved, ByteBuffer-based RasterData.

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.coverage.raster.data.nio.ByteBufferRasterData
dataAccess, dataInfo, info, rasterHeight, rasterWidth
 
Fields inherited from interface org.deegree.coverage.raster.data.RasterData
TYPE_BYTE_RGB, TYPE_BYTE_RGBA
 
Constructor Summary
LineInterleavedRasterData(RasterRect sampleDomain, int rasterWidth, int rasterHeight, RasterDataInfo dataInfo)
          Creates a new LineInterleavedRasterData with given size, number of bands and data type, backed with no data.
LineInterleavedRasterData(RasterRect sampleDomain, int rasterWidth, int rasterHeight, RasterReader reader, RasterDataInfo dataInfo)
          Creates a new LineInterleavedRasterData with given size, number of bands and data type
 
Method Summary
protected  ByteBufferRasterData createCompatibleEmptyRasterData()
           
 LineInterleavedRasterData createCompatibleRasterData(DataView view)
          Implementation should create a view of this raster data.
 RasterData createCompatibleWritableRasterData(RasterRect sampleDomain, BandType[] bands)
          Create a writable compatible raster with the height and width of the given sample domain.
 int getBandStride()
          Returns the byte offset to the next sample of the same pixel.
 int getLineStride()
          Returns the byte offset to the next row (same column, same sample)
 int getPixelStride()
          Retruns the byte offset to the next pixel.
 
Methods inherited from class org.deegree.coverage.raster.data.nio.ByteBufferRasterData
asReadOnly, calculatePos, calculatePos, calculateViewPos, calculateViewPos, checkBounds, checkBoundsEx, clampSize, createCompatibleRasterData, createCompatibleRasterData, createCompatibleRasterData, createCompatibleRasterData, createCompatibleRasterData, createRasterDataInfo, dispose, fillWithNoData, getBands, getByteBuffer, getBytebufferDomain, getBytePixel, getBytes, getByteSample, getColumns, getDataInfo, getDataType, getDoublePixel, getDoubles, getDoubleSample, getFloatPixel, getFloats, getFloatSample, getIntPixel, getInts, getIntSample, getNullPixel, getOriginalDataInfo, getOriginalHeight, getOriginalWidth, getPixel, getReader, getRequiredBufferSize, getRows, getSample, getShortPixel, getShorts, getShortSample, getSubset, getSubset, getView, initByteBuffer, min, setByteBuffer, setBytePixel, setBytes, setByteSample, setDoublePixel, setDoubles, setDoubleSample, setFloatPixel, setFloats, setFloatSample, setIntPixel, setInts, setIntSample, setNoDataValue, setPixel, setSample, setShortPixel, setShorts, setShortSample, setSubset, setSubset, setSubset, setSubset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineInterleavedRasterData

public LineInterleavedRasterData(RasterRect sampleDomain,
                                 int rasterWidth,
                                 int rasterHeight,
                                 RasterDataInfo dataInfo)
Creates a new LineInterleavedRasterData with given size, number of bands and data type, backed with no data.

Parameters:
sampleDomain - the raster rectangle defining the sample domain of this raster data.
rasterWidth - width of the underlying raster data.
rasterHeight - height of the underlying raster data.
dataInfo - containing information about the underlying raster.

LineInterleavedRasterData

public LineInterleavedRasterData(RasterRect sampleDomain,
                                 int rasterWidth,
                                 int rasterHeight,
                                 RasterReader reader,
                                 RasterDataInfo dataInfo)
Creates a new LineInterleavedRasterData with given size, number of bands and data type

Parameters:
sampleDomain - the raster rectangle defining the sample domain of this raster data.
rasterWidth - width of the underlying raster data.
rasterHeight - height of the underlying raster data.
reader - to be used for reading the data, may be null
dataInfo - containing information about the underlying raster.
Method Detail

createCompatibleRasterData

public LineInterleavedRasterData createCompatibleRasterData(DataView view)
Description copied from class: ByteBufferRasterData
Implementation should create a view of this raster data.

Specified by:
createCompatibleRasterData in class ByteBufferRasterData
Parameters:
view - the new view on this data
Returns:
a view or new raster data object, backed by a ByteBuffer

createCompatibleWritableRasterData

public RasterData createCompatibleWritableRasterData(RasterRect sampleDomain,
                                                     BandType[] bands)
Description copied from interface: RasterData
Create a writable compatible raster with the height and width of the given sample domain.

Parameters:
sampleDomain - the raster rectangle defining the sample domain of this raster data.
bands - indices to the requested bands if null all bands will be available.
Returns:
new empty raster

createCompatibleEmptyRasterData

protected ByteBufferRasterData createCompatibleEmptyRasterData()
Specified by:
createCompatibleEmptyRasterData in class ByteBufferRasterData
Returns:
ByteBufferRasterData with unset data

getBandStride

public final int getBandStride()
Description copied from class: ByteBufferRasterData
Returns the byte offset to the next sample of the same pixel.

Specified by:
getBandStride in class ByteBufferRasterData
Returns:
byte offset to sample in the next band (same pixel)

getLineStride

public final int getLineStride()
Description copied from class: ByteBufferRasterData
Returns the byte offset to the next row (same column, same sample)

Specified by:
getLineStride in class ByteBufferRasterData
Returns:
byte offset to next row (same column, same sample)

getPixelStride

public final int getPixelStride()
Description copied from class: ByteBufferRasterData
Retruns the byte offset to the next pixel.

Specified by:
getPixelStride in class ByteBufferRasterData
Returns:
byte offset to next pixel


Copyright © 2011. All Rights Reserved.