|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.coverage.raster.data.TiledRasterData
public class TiledRasterData
The TiledRasterData
is a grid of raster data, wrapping all pixel operations on the tiles.
Field Summary |
---|
Fields inherited from interface org.deegree.coverage.raster.data.RasterData |
---|
TYPE_BYTE_RGB, TYPE_BYTE_RGBA |
Constructor Summary | |
---|---|
protected |
TiledRasterData(GridReader reader,
RasterIOOptions options)
|
Method Summary | |
---|---|
RasterData |
asReadOnly()
Return a read-only version of this RasterData. |
RasterData |
createCompatibleRasterData()
Returns a new RasterData with the same size, bands, DataType and InterleaveType |
RasterData |
createCompatibleRasterData(BandType[] bands)
Returns a new RasterData with the same size, DataType and InterleaveType |
RasterData |
createCompatibleRasterData(int width,
int height)
Returns a new RasterData with the same DataType and InterleaveType and all bands |
ByteBufferRasterData |
createCompatibleRasterData(RasterRect sampleDomain)
Returns a view as a new RasterData with the same DataType and InterleaveType but valid only for the given rect. |
RasterData |
createCompatibleRasterData(RasterRect sampleDomain,
BandType[] bands)
Returns a new RasterData with the same DataType and InterleaveType |
RasterData |
createCompatibleWritableRasterData(RasterRect sampleDomain,
BandType[] bands)
Create a writable compatible raster with the height and width of the given sample domain. |
void |
dispose()
Try to dispose all allocated memory of this data object. |
int |
getBands()
Returns the number of bands of the raster |
byte[] |
getBytePixel(int x,
int y,
byte[] result)
Returns a byte array with all sample values from coordinate x/y. |
byte[] |
getBytes(int x,
int y,
int width,
int height,
int band,
byte[] result)
Gets values from the specified rectangle and band. |
byte |
getByteSample(int x,
int y,
int band)
Returns a byte sample from coordinate x/y and selected band. |
RasterDataInfo |
getDataInfo()
Returns an encapsulation of all available information of this raster data. |
DataType |
getDataType()
Returns the data type of the raster. |
double[] |
getDoublePixel(int x,
int y,
double[] result)
Returns a double array with all sample values from coordinate x/y. |
double[] |
getDoubles(int x,
int y,
int width,
int height,
int band,
double[] result)
Gets values from the specified rectangle and band. |
double |
getDoubleSample(int x,
int y,
int band)
Returns a double sample from coordinate x/y and selected band. |
float[] |
getFloatPixel(int x,
int y,
float[] result)
Returns a float array with all sample values from coordinate x/y. |
float[] |
getFloats(int x,
int y,
int width,
int height,
int band,
float[] result)
Gets values from the specified rectangle and band. |
float |
getFloatSample(int x,
int y,
int band)
Returns a float sample from coordinate x/y and selected band. |
int |
getHeight()
Returns the height of the raster |
int[] |
getIntPixel(int x,
int y,
int[] result)
Returns an integer array with all sample values from coordinate x/y. |
int[] |
getInts(int x,
int y,
int width,
int height,
int band,
int[] result)
Gets values from the specified rectangle and band. |
int |
getIntSample(int x,
int y,
int band)
Returns an integer sample from coordinate x/y and selected band. |
byte[] |
getNullPixel(byte[] result)
Returns the no data values for this raster, or the view of this rasters bands. |
byte[] |
getPixel(int x,
int y,
byte[] result)
Returns a pixel as byte array, regardless of the DataType. i.e. a FLOAT DataType results in a four byte array. |
byte[] |
getSample(int x,
int y,
int band,
byte[] result)
Returns a sample as byte array, regardless of the DataType. i.e. a FLOAT DataType results in a four byte array |
short[] |
getShortPixel(int x,
int y,
short[] result)
Returns a short array with all sample values from coordinate x/y. |
short[] |
getShorts(int x,
int y,
int width,
int height,
int band,
short[] result)
Gets values from the specified rectangle and band. |
short |
getShortSample(int x,
int y,
int band)
Returns a short sample from coordinate x/y and selected band. |
RasterData |
getSubset(RasterRect rasterRect)
Returns new RasterData object for the specified rectangle. |
RasterData |
getSubset(RasterRect rasterRect,
BandType[] bands)
Returns new single-band RasterData object for the specified rectangle. |
int |
getWidth()
Returns the width of the raster |
void |
setBytePixel(int x,
int y,
byte[] pixel)
Sets a single pixel with byte values for each sample. |
void |
setBytes(int x,
int y,
int width,
int height,
int band,
byte[] values)
Sets values from the array to the specified rectangle and band. |
void |
setByteSample(int x,
int y,
int band,
byte value)
Sets a single byte sample on coordinate x/y and selected band. |
void |
setDoublePixel(int x,
int y,
double[] pixel)
Sets a single pixel with double values for each sample. |
void |
setDoubles(int x,
int y,
int width,
int height,
int band,
double[] values)
Sets values from the array to the specified rectangle and band. |
void |
setDoubleSample(int x,
int y,
int band,
double value)
Sets a single double sample on coordinate x/y and selected band. |
void |
setFloatPixel(int x,
int y,
float[] pixel)
Sets a single pixel with float values for each sample. |
void |
setFloats(int x,
int y,
int width,
int height,
int band,
float[] values)
Sets values from the array to the specified rectangle and band. |
void |
setFloatSample(int x,
int y,
int band,
float value)
Sets a single float sample on coordinate x/y and selected band. |
void |
setIntPixel(int x,
int y,
int[] pixel)
Sets a single pixel with integer values for each sample. |
void |
setInts(int x,
int y,
int width,
int height,
int band,
int[] values)
Sets values from the array to the specified rectangle and band. |
void |
setIntSample(int x,
int y,
int band,
int value)
Sets a single integer sample on coordinate x/y and selected band. |
void |
setNoDataValue(byte[] values)
Sets the no data values for this raster |
void |
setPixel(int x,
int y,
byte[] pixel)
Sets a pixel with data from a byte array, regardless of the DataType. i.e. a float sample must be packed as a four byte array. |
void |
setSample(int x,
int y,
int band,
byte[] values)
Sets a sample with data from a byte array, regardless of the DataType. i.e. a float must be packed as a four byte array |
void |
setShortPixel(int x,
int y,
short[] pixel)
Sets a single pixel with short values for each sample. |
void |
setShorts(int x,
int y,
int width,
int height,
int band,
short[] values)
Sets values from the array to the specified rectangle and band. |
void |
setShortSample(int x,
int y,
int band,
short value)
Sets a single short sample on coordinate x/y and selected band. |
void |
setSubset(int x,
int y,
int width,
int height,
int dstBand,
RasterData sourceRaster,
int srcBand)
Sets a single band of the raster with values from one band of the sourceRaster. |
void |
setSubset(int x,
int y,
int width,
int height,
int dstBand,
RasterData sourceRaster,
int srcBand,
int xOffset,
int yOffset)
Sets a single band of the raster with values from one band of the sourceRaster. |
void |
setSubset(int x,
int y,
int width,
int height,
RasterData sourceRaster)
Sets the raster with values from sourceRaster. |
void |
setSubset(int x,
int y,
int width,
int height,
RasterData sourceRaster,
int xOffset,
int yOffset)
Sets the raster with values from sourceRaster. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TiledRasterData(GridReader reader, RasterIOOptions options)
reader
- to be used for the tiles.noData
- Method Detail |
---|
public RasterData asReadOnly()
RasterData
asReadOnly
in interface RasterData
public RasterData createCompatibleRasterData(RasterRect sampleDomain, BandType[] bands)
RasterData
createCompatibleRasterData
in interface RasterData
sampleDomain
- the raster rectangle defining the sample domain of this raster data.bands
- indices to the requested bands
public ByteBufferRasterData createCompatibleRasterData(RasterRect sampleDomain)
RasterData
createCompatibleRasterData
in interface RasterData
sampleDomain
- the raster rectangle defining the sample domain of this raster data.
public RasterData createCompatibleRasterData(int width, int height)
RasterData
createCompatibleRasterData
in interface RasterData
width
- width of the new rasterheight
- height of the new raster
public RasterData createCompatibleRasterData(BandType[] bands)
RasterData
createCompatibleRasterData
in interface RasterData
bands
- definitions of the new rasterdata.
public RasterData createCompatibleRasterData()
RasterData
createCompatibleRasterData
in interface RasterData
public RasterData createCompatibleWritableRasterData(RasterRect sampleDomain, BandType[] bands)
RasterData
createCompatibleWritableRasterData
in interface RasterData
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.
public int getBands()
RasterData
getBands
in interface RasterData
public byte[] getBytePixel(int x, int y, byte[] result)
RasterData
getBytePixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public byte getByteSample(int x, int y, int band)
RasterData
getByteSample
in interface RasterData
band
- band number for sample
public byte[] getBytes(int x, int y, int width, int height, int band, byte[] result)
RasterData
getBytes
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public RasterDataInfo getDataInfo()
RasterData
getDataInfo
in interface RasterData
public DataType getDataType()
RasterData
getDataType
in interface RasterData
public double[] getDoublePixel(int x, int y, double[] result)
RasterData
getDoublePixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public double getDoubleSample(int x, int y, int band)
RasterData
getDoubleSample
in interface RasterData
band
- band number for sample
public double[] getDoubles(int x, int y, int width, int height, int band, double[] result)
RasterData
getDoubles
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public float[] getFloatPixel(int x, int y, float[] result)
RasterData
getFloatPixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public float getFloatSample(int x, int y, int band)
RasterData
getFloatSample
in interface RasterData
band
- band number for sample
public float[] getFloats(int x, int y, int width, int height, int band, float[] result)
RasterData
getFloats
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public int getHeight()
RasterData
getHeight
in interface RasterData
public int[] getIntPixel(int x, int y, int[] result)
RasterData
getIntPixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public int getIntSample(int x, int y, int band)
RasterData
getIntSample
in interface RasterData
band
- band number for sample
public int[] getInts(int x, int y, int width, int height, int band, int[] result)
RasterData
getInts
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public byte[] getNullPixel(byte[] result)
RasterData
getNullPixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public byte[] getPixel(int x, int y, byte[] result)
RasterData
getPixel
in interface RasterData
result
- a byte array to put the values into or null
result
array or a new array, if the result
array is null
public byte[] getSample(int x, int y, int band, byte[] result)
RasterData
getSample
in interface RasterData
band
- selected bandresult
- an array to put the values into or null
result
array or a new array, if the result
array is null
public short[] getShortPixel(int x, int y, short[] result)
RasterData
getShortPixel
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public short getShortSample(int x, int y, int band)
RasterData
getShortSample
in interface RasterData
band
- band number for sample
public short[] getShorts(int x, int y, int width, int height, int band, short[] result)
RasterData
getShorts
in interface RasterData
result
- an array to put the values into or null
result
array or a new array, if the result
array is null
public int getWidth()
RasterData
getWidth
in interface RasterData
public void setBytePixel(int x, int y, byte[] pixel)
RasterData
setBytePixel
in interface RasterData
pixel
- array with one sample per bandpublic void setByteSample(int x, int y, int band, byte value)
RasterData
setByteSample
in interface RasterData
band
- band number for samplevalue
- new value for samplepublic void setBytes(int x, int y, int width, int height, int band, byte[] values)
RasterData
setBytes
in interface RasterData
values
- the samples to put into the rasterpublic void setDoublePixel(int x, int y, double[] pixel)
RasterData
setDoublePixel
in interface RasterData
pixel
- array with one sample per bandpublic void setDoubleSample(int x, int y, int band, double value)
RasterData
setDoubleSample
in interface RasterData
band
- band number for samplevalue
- new value for samplepublic void setDoubles(int x, int y, int width, int height, int band, double[] values)
RasterData
setDoubles
in interface RasterData
values
- the samples to put into the rasterpublic void setFloatPixel(int x, int y, float[] pixel)
RasterData
setFloatPixel
in interface RasterData
pixel
- array with one sample per bandpublic void setFloatSample(int x, int y, int band, float value)
RasterData
setFloatSample
in interface RasterData
band
- band number for samplevalue
- new value for samplepublic void setFloats(int x, int y, int width, int height, int band, float[] values)
RasterData
setFloats
in interface RasterData
values
- the samples to put into the rasterpublic void setIntPixel(int x, int y, int[] pixel)
RasterData
setIntPixel
in interface RasterData
pixel
- array with one sample per bandpublic void setIntSample(int x, int y, int band, int value)
RasterData
setIntSample
in interface RasterData
band
- band number for samplevalue
- new value for samplepublic void setInts(int x, int y, int width, int height, int band, int[] values)
RasterData
setInts
in interface RasterData
values
- the samples to put into the rasterpublic void setNoDataValue(byte[] values)
RasterData
setNoDataValue
in interface RasterData
values
- an array with the null valuespublic void setPixel(int x, int y, byte[] pixel)
RasterData
setPixel
in interface RasterData
public void setSample(int x, int y, int band, byte[] values)
RasterData
setSample
in interface RasterData
band
- selected bandvalues
- array with the sample valuepublic void setShortPixel(int x, int y, short[] pixel)
RasterData
setShortPixel
in interface RasterData
pixel
- array with one sample per bandpublic void setShortSample(int x, int y, int band, short value)
RasterData
setShortSample
in interface RasterData
band
- band number for samplevalue
- new value for samplepublic void setShorts(int x, int y, int width, int height, int band, short[] values)
RasterData
setShorts
in interface RasterData
values
- the samples to put into the rasterpublic RasterData getSubset(RasterRect rasterRect)
RasterData
getSubset
in interface RasterData
rasterRect
- rectangle for subset
public RasterData getSubset(RasterRect rasterRect, BandType[] bands)
RasterData
getSubset
in interface RasterData
rasterRect
- rectangle for subsetbands
- selected band
public void setSubset(int x, int y, int width, int height, RasterData sourceRaster)
RasterData
setSubset
in interface RasterData
x
- insert positiony
- insert positionwidth
- width of the subsetheight
- height of the subsetsourceRaster
- data source to copypublic void setSubset(int x, int y, int width, int height, RasterData sourceRaster, int xOffset, int yOffset)
RasterData
setSubset
in interface RasterData
x
- insert positiony
- insert positionwidth
- width of the subsetheight
- height of the subsetsourceRaster
- data source to copyxOffset
- x offset in the source rasteryOffset
- y offset in the source rasterpublic void setSubset(int x, int y, int width, int height, int dstBand, RasterData sourceRaster, int srcBand)
RasterData
setSubset
in interface RasterData
x
- insert positiony
- insert positionwidth
- width of the subsetheight
- height of the subsetdstBand
- the index of the destination bandsourceRaster
- data source to copysrcBand
- the index of the source band of sourceRaster
public void setSubset(int x, int y, int width, int height, int dstBand, RasterData sourceRaster, int srcBand, int xOffset, int yOffset)
RasterData
setSubset
in interface RasterData
x
- insert positiony
- insert positionwidth
- width of the subsetheight
- height of the subsetdstBand
- the index of the destination bandsourceRaster
- data source to copysrcBand
- the index of the source band of sourceRaster
xOffset
- x offset in the source rasteryOffset
- y offset in the source rasterpublic void dispose()
RasterData
dispose
in interface RasterData
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |