com.esri.sde.sdk.client
Class SeRasterBand

java.lang.Object
  extended by com.esri.sde.sdk.client.SeRasterBand
All Implemented Interfaces:
java.lang.Cloneable

public class SeRasterBand
extends java.lang.Object
implements java.lang.Cloneable

A SeRasterBand object for supporting ArcSDE SeRaster object.

Since:
ArcSDE 9.0
See Also:
SeRasterColumn, SeRaster

Nested Class Summary
static class SeRasterBand.SeRasterBandColorMap
          SeRasterBand inner class SeRasterBandColorMap.
static class SeRasterBand.SeRasterBandStats
          SeRasterBand inner class SeRasterBandStats.
 
Constructor Summary
SeRasterBand(SeConnection conn)
          Constructs SeRasterBand with specified SeConnection handle conn
 
Method Summary
 void alter()
          Alters database entry for raster band
 SeObjectId create()
          Create a database entry for raster band
 void delete()
          Delete database entry for raster band
 int getBandHeight()
          Retrieves raster band's height.
 java.lang.String getBandName()
          Retrieves band's name from raster band instance.
 int getBandNumber()
          Retrieves band's sequence number from raster band instance.
 int getBandWidth()
          Retrieves raster band's width.
 SeRasterBand.SeRasterBandColorMap getColorMap()
          Returns SeRasterBandColorMap object for this SeRasterBand instance, if exist, see hasColorMap().
 java.awt.image.DataBuffer getColorMapData()
          Gets colormap data, if exist.
 int getColorMapDataType()
          Gets colormap data type, if exist.
 int getColorMapNumBanks()
          Gets number of banksin colormap, if exist.
 int getColorMapNumEntries()
          Gets number of entries per bank in colormap, if exist.
 int getColorMapType()
          Gets colormap type, if exist.
 int getCompressionType()
          Retrieves raster band's compression type.
 SeExtent getExtent()
          Retrieves raster band extent (envelope).
 SeObjectId getId()
          Retrieves raster band ID.
 void getInfoById(SeObjectId rasBandIdObj)
          Retrieves raster band in by raster band ID.
static SeRasterBand[] getInfoList(SeConnection conn, SeObjectId rasColIdObj)
          Deprecated. Recommend using SeRaster.getBands() instead, which is much more efficient since the records will be cached on the client side following the first execution. getInfoList() will not cache the results and therefore should be replaced with a call to SeRaster.getBands().
 int getInterleave()
          Retrieves interleave type.
 int getInterpolation()
          Retrieves interpolation method
 int getMaxLevel()
          Retrieves the maximum pyramid level.
 int getPixelDepth()
          Return pixel depth in number of bits.
 int getPixelType()
          Retrieves pixel type.
 SeObjectId getRasterColumnId()
          Retrieves raster_column layer ID.
 SeObjectId getRasterId()
          Retrieves raster image ID.
 SeRasterBand.SeRasterBandStats getStats()
          Returns SeRasterBandStats info from ArcSDE server, if exist, see hasStats().
 double[] getStatsBinTable()
          Retrieves raster band statistic's Bin table, if exist.
 int getStatsBinType()
          Retrieves raster band statistic's Bin function type, if exist.
 double[] getStatsHistogram()
          Retrieves raster band statistic's histogram, if exist.
 double getStatsMax()
          Retrieves max pixel value from raster band statistic, if exist.
 double getStatsMean()
          Retrieves mean pixel value from raster band statistic, if exist.
 double getStatsMin()
          Retrieves min pixel value from raster band statistic, if exist.
 int getStatsNumBins()
          Retrieves number of bins in raster band statistic object, if exist.
 double getStatsStdDev()
          Retrieves pixel's standard deviation value from raster band statistic, if exist.
 int getTileHeight()
          Retrieves raster tile's height.
 SDEPoint getTileOrigin()
          Retrieves the coordinates of the upper-left corner pixel of tile (0, 0)
 int getTileWidth()
          Retrieves raster tile's width.
 java.util.Date getTime(int whichTime)
          Retrieves createion_date or last_modified_date from raster band object.
 SeTransform[] getTransformList()
          Retrieves transform list.
 boolean hasColorMap()
          Reture true, if raster band has colormap.
 boolean hasStats()
          Return true, if raster band has statistic info available.
 boolean hasTransformList()
          Return true, if raster band has transformation list.
static int pixelTypeGetDepth(int pixelType)
          Class method: Return bits per pixel from pixel_type.
 void setBandName(java.lang.String bandName)
          Sets raster band's name in raster band instance.
 void setBandNumber(int sequenceNumber)
          Sets current raster band's sequence number.
 void setBandSize(int bandWidth, int bandHeight)
          Sets raster band size (band_width and band_height).
 void setColorMap(int colormapType, java.awt.image.DataBuffer colormapData)
          Sets colormap in raster band instance.
 void setColorMap(int colormap_type, java.awt.image.DataBufferByte buffByte)
          Sets colormap in raster band instance.
 void setColorMap(int colormap_type, java.awt.image.DataBufferShort buffShort)
          Sets colormap in raster band instance.
 void setCompressionType(int compressionType)
          Sets compression type.
 void setExtent(SeExtent envelope)
          Sets image extent in the raster band object.
 void setId(SeObjectId bandIdObj)
          Sets the raster band ID.
 void setMaxLevel(int maxLevel, boolean skipLevelOne)
          Sets the maximum pyramid level of image.
 void setPixelType(int pixelType)
          Sets pixel type in raster band object.
 void setRasterColumnId(SeObjectId rasColIdObj)
          Sets raster_column ID.
 void setStatsBinFunction(int binFuncType, int numBins, double[] binTable)
          Sets SeRasterBand instance with specified binFuncType, numBins and binTable.
 void setTileSize(int tileWidth, int tileHeight)
          Sets raster tile's size (tileWidth and tileHeight).
 void setTransformList(SeTransform[] transformList)
          Sets transform list.
 boolean skipLevelOne()
          Return true, if skip pyramid level one.
 java.lang.String toString()
          toString () method for SeRasterBand object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeRasterBand

public SeRasterBand(SeConnection conn)
Constructs SeRasterBand with specified SeConnection handle conn

Top of SeRasterBand class.

Parameters:
conn - a SeConnection handle.
Method Detail

alter

public void alter()
           throws SeException
Alters database entry for raster band

Throws:
SeException - if an error occurs

create

public SeObjectId create()
                  throws SeException
Create a database entry for raster band

Returns:
a SeObjectId value
Throws:
SeException - if an error occurs

delete

public void delete()
            throws SeException
Delete database entry for raster band

Throws:
SeException - if an error occurs

getInfoList

public static SeRasterBand[] getInfoList(SeConnection conn,
                                         SeObjectId rasColIdObj)
                                  throws SeException
Deprecated. Recommend using SeRaster.getBands() instead, which is much more efficient since the records will be cached on the client side following the first execution. getInfoList() will not cache the results and therefore should be replaced with a call to SeRaster.getBands().

Class method: Gets all raster band info in a array list for the specified rasColIdObj

Parameters:
conn - a SeConnection handle.
rasColIdObj - a SeObjectId value
Returns:
a SeRasterBand[] value
Throws:
SeException - if an error occurs
See Also:
SeRaster.getBands(), getInfoById(com.esri.sde.sdk.client.SeConnection, com.esri.sde.sdk.client.SeObjectId, com.esri.sde.sdk.client.SeObjectId)

getInfoById

public void getInfoById(SeObjectId rasBandIdObj)
                 throws SeException
Retrieves raster band in by raster band ID.

Parameters:
rasBandIdObj - a SeObjectId value
Throws:
SeException - if an error occurs
See Also:
getInfoList(com.esri.sde.sdk.client.SeConnection, com.esri.sde.sdk.client.SeObjectId)

getBandName

public java.lang.String getBandName()
Retrieves band's name from raster band instance.

Returns:
a String value
See Also:
setBandName(String)

getBandNumber

public int getBandNumber()
Retrieves band's sequence number from raster band instance.

Returns:
an int value
See Also:
setBandNumber(int)

getBandHeight

public int getBandHeight()
Retrieves raster band's height.

Returns:
an int value
See Also:
setBandSize(int, int)

getBandWidth

public int getBandWidth()
Retrieves raster band's width.

Returns:
an int value
See Also:
setBandSize(int, int)

getCompressionType

public int getCompressionType()
Retrieves raster band's compression type. See setCompressionType for valid compression_type values.

Returns:
an int value
See Also:
setCompressionType(int)

getExtent

public SeExtent getExtent()
Retrieves raster band extent (envelope).

Returns:
a SeExtent value
See Also:
setExtent(SeExtent)

getId

public SeObjectId getId()
Retrieves raster band ID.

Returns:
a SeObjectId value

getInterpolation

public int getInterpolation()
Retrieves interpolation method

Returns:
interpolation as an int value
See Also:
SeRasterAttr.setPyramidInfo(int, boolean, int), SeRasterAttr.getInterpolation()

getInterleave

public int getInterleave()
Retrieves interleave type.

Returns:
interleave as an int value
Throws:
SeException - if an error occurs
See Also:
setInterleaveType(int)

getMaxLevel

public int getMaxLevel()
Retrieves the maximum pyramid level.

Returns:
an int value
See Also:
setMaxLevel(int, boolean)

getPixelDepth

public int getPixelDepth()
Return pixel depth in number of bits.

Returns:
an int value
See Also:
getPixelType(), setPixelType(int)

getPixelType

public int getPixelType()
Retrieves pixel type. See setPixelType(int) for valid pixel_type values.

Returns:
an int value
See Also:
getPixelDepth(), setPixelType(int)

getRasterColumnId

public SeObjectId getRasterColumnId()
Retrieves raster_column layer ID.

Returns:
a SeObjectId value
See Also:
setRasterColumnId(com.esri.sde.sdk.client.SeObjectId)

getRasterId

public SeObjectId getRasterId()
Retrieves raster image ID.

Returns:
a SeObjectId value

getTileHeight

public int getTileHeight()
Retrieves raster tile's height.

Returns:
an int value
See Also:
getTileWidth(), setTileSize(int, int)

getTileWidth

public int getTileWidth()
Retrieves raster tile's width.

Returns:
an int value
See Also:
getTileHeight(), setTileSize(int, int)

getTileOrigin

public SDEPoint getTileOrigin()
                       throws SeException
Retrieves the coordinates of the upper-left corner pixel of tile (0, 0)

Returns:
a SDEPoint value
Throws:
SeException - if an error occurs

getTime

public java.util.Date getTime(int whichTime)
                       throws SeException
Retrieves createion_date or last_modified_date from raster band object.

The whichTime argument accepts the following values:

Parameters:
whichTime - an int value
Returns:
a java.util.Date value
Throws:
SeException - if an error occurs

getTransformList

public SeTransform[] getTransformList()
                               throws SeException
Retrieves transform list. Note that the return SeTransform[] list is a one-dimensional array, consisting of "count" number of transform pairs: where length = SeTransform.length; count = (length / 2); Fwd[0], Inv[0], ..., Fwd[count-1], Inv[count-1] OR SeTransform[0] == Fwd[0] SeTransform[1] == Inv[0] . . SeTransform[length-2] == Fwd[count-1] SeTransform[length-1] == Inv[count-1]

Returns:
a SeTransform[] value
Throws:
SeException - if an error occurs
See Also:
setTransformList(com.esri.sde.sdk.client.SeTransform[])

hasTransformList

public boolean hasTransformList()
Return true, if raster band has transformation list.

Returns:
a boolean value

skipLevelOne

public boolean skipLevelOne()
Return true, if skip pyramid level one.

Returns:
a boolean value

setId

public void setId(SeObjectId bandIdObj)
           throws SeException
Sets the raster band ID.

Parameters:
bandIdObj - a SeObjectId value
Throws:
SeException - if an error occurs

setBandName

public void setBandName(java.lang.String bandName)
Sets raster band's name in raster band instance.

Parameters:
bandName - a String value
See Also:
getBandName()

setBandNumber

public void setBandNumber(int sequenceNumber)
                   throws SeException
Sets current raster band's sequence number.

Parameters:
sequenceNumber - an int value
Throws:
SeException - if an error occurs
See Also:
getBandNumber()

setBandSize

public void setBandSize(int bandWidth,
                        int bandHeight)
Sets raster band size (band_width and band_height).

Parameters:
bandWidth - an int value
bandHeight - an int value
See Also:
getBandHeight(), getBandWidth()

setCompressionType

public void setCompressionType(int compressionType)
                        throws SeException
Sets compression type.

The compression_type argument accepts the following values:

SeRaster.SE_COMPRESSION_JP2 is not yet implemented.

Parameters:
compressionType - an int value
Throws:
SeException - if an error occurs
See Also:
getCompressionType()

setExtent

public void setExtent(SeExtent envelope)
               throws SeException
Sets image extent in the raster band object.

Parameters:
envelope - a SeExtent value. Band extent.
Throws:
SeException - if an error occurs
See Also:
getExtent()

setMaxLevel

public void setMaxLevel(int maxLevel,
                        boolean skipLevelOne)
                 throws SeException
Sets the maximum pyramid level of image.

Parameters:
maxLevel - an int value
skipLevelOne - a boolean value
Throws:
SeException - if an error occurs
See Also:
getMaxLevel()

setPixelType

public void setPixelType(int pixelType)
                  throws SeException
Sets pixel type in raster band object.

The pixelType argument accepts the following values:

Parameters:
pixelType - an int value
Throws:
SeException - if an error occurs
See Also:
getPixelDepth(), getPixelType()

setRasterColumnId

public void setRasterColumnId(SeObjectId rasColIdObj)
                       throws SeException
Sets raster_column ID.

Parameters:
rasColIdObj - a SeObjectId value
Throws:
SeException - if an error occurs
See Also:
getRasterColumnId()

setTileSize

public void setTileSize(int tileWidth,
                        int tileHeight)
                 throws SeException
Sets raster tile's size (tileWidth and tileHeight).

Parameters:
tileWidth - an int value
tileHeight - an int value
Throws:
SeException - if an error occurs
See Also:
getTileHeight(), getTileWidth()

setTransformList

public void setTransformList(SeTransform[] transformList)
                      throws SeException
Sets transform list. Note that the input transformList[] list is a one-dimensional array, consisting of "count" number of transform pairs: where length = transformList.length; count = (length / 2); Fwd[0], Inv[0], ..., Fwd[count-1], Inv[count-1] OR transformList[0] == Fwd[0] transformList[1] == Inv[0] . . transformList[length-2] == Fwd[count-1] transformList[length-1] == Inv[count-1]

Parameters:
transformList - an SeTransform[] value
Throws:
SeException - if an error occurs
See Also:
getTransformList()

pixelTypeGetDepth

public static int pixelTypeGetDepth(int pixelType)
Class method: Return bits per pixel from pixel_type.


toString

public java.lang.String toString()
toString () method for SeRasterBand object.

Overrides:
toString in class java.lang.Object
Returns:
a String value

getStats

public SeRasterBand.SeRasterBandStats getStats()
                                        throws SeException
Returns SeRasterBandStats info from ArcSDE server, if exist, see hasStats().

Returns:
a SeRasterBandStats value
Throws:
SeException - if an error occurs
See Also:
hasStats()

getStatsBinTable

public double[] getStatsBinTable()
                          throws SeException
Retrieves raster band statistic's Bin table, if exist.

Returns:
a double[] value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getBinTable()

getStatsBinType

public int getStatsBinType()
                    throws SeException
Retrieves raster band statistic's Bin function type, if exist.

Returns:
an int value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getBinType()

getStatsHistogram

public double[] getStatsHistogram()
                           throws SeException
Retrieves raster band statistic's histogram, if exist.

Returns:
a double[] value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getHistogram()

getStatsMax

public double getStatsMax()
                   throws SeException
Retrieves max pixel value from raster band statistic, if exist.

Returns:
a double value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getMax()

getStatsMean

public double getStatsMean()
                    throws SeException
Retrieves mean pixel value from raster band statistic, if exist.

Returns:
a double value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getMean()

getStatsMin

public double getStatsMin()
                   throws SeException
Retrieves min pixel value from raster band statistic, if exist.

Returns:
a double value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getMin()

getStatsNumBins

public int getStatsNumBins()
                    throws SeException
Retrieves number of bins in raster band statistic object, if exist.

Returns:
an int value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getNumBins()

getStatsStdDev

public double getStatsStdDev()
                      throws SeException
Retrieves pixel's standard deviation value from raster band statistic, if exist.

Returns:
a double value
Throws:
SeException - if an error occurs
See Also:
hasStats(), getStats(), SeRasterBand.SeRasterBandStats.getStdDev()

hasStats

public boolean hasStats()
Return true, if raster band has statistic info available.

Returns:
a boolean value

setStatsBinFunction

public void setStatsBinFunction(int binFuncType,
                                int numBins,
                                double[] binTable)
                         throws SeException
Sets SeRasterBand instance with specified binFuncType, numBins and binTable.

1. If binFuncType is SeRaster.SE_BIN_FUNCTION_NONE, then the statistics will be removed for the current raster band.

2. If binFuncType is SeRaster.SE_BIN_FUNCTION_AUTO, set numBins=0, binTable=NULL when calling this function. Then the actual bin function will be selected according to the pixel type.

3. If binFuncType is SeRaster.SE_BIN_FUNCTION_DIRECT , numBins should be set to 0. The actual number of bins will be based on the dataset.

NOTE: This function is expected to be called only with alter(), create() will ignore the bin function information.

Parameters:
binFuncType - an int value
numBins - an int value
binTable - a double[] value
Throws:
SeException - if an error occurs

getColorMap

public SeRasterBand.SeRasterBandColorMap getColorMap()
                                              throws SeException
Returns SeRasterBandColorMap object for this SeRasterBand instance, if exist, see hasColorMap().

Returns:
a SeRasterBandColorMap value
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), setColorMap(int, java.awt.image.DataBufferByte)

getColorMapData

public java.awt.image.DataBuffer getColorMapData()
                                          throws SeException
Gets colormap data, if exist.

Returns:
an DataBuffer value
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), getColorMap(), SeRasterBand.SeRasterBandColorMap.getData()

getColorMapDataType

public int getColorMapDataType()
                        throws SeException
Gets colormap data type, if exist.

Returns:
Colormap data type as an int value.
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), getColorMap(), SeRasterBand.SeRasterBandColorMap.getDataType()

getColorMapNumBanks

public int getColorMapNumBanks()
                        throws SeException
Gets number of banksin colormap, if exist.

Returns:
number of banks in colormap an int value
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), getColorMap(), SeRasterBand.SeRasterBandColorMap.getNumBanks()

getColorMapNumEntries

public int getColorMapNumEntries()
                          throws SeException
Gets number of entries per bank in colormap, if exist.

Returns:
number of entries in colormap an int value
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), getColorMap(), SeRasterBand.SeRasterBandColorMap.getNumEntries()

getColorMapType

public int getColorMapType()
                    throws SeException
Gets colormap type, if exist.

Returns:
colormap type an int value
Throws:
SeException - if an error occurs
See Also:
hasColorMap(), getColorMap(), SeRasterBand.SeRasterBandColorMap.getColorMapType()

hasColorMap

public boolean hasColorMap()
Reture true, if raster band has colormap.

Returns:
true, if raster band has colormap.
See Also:
getColorMap()

setColorMap

public void setColorMap(int colormap_type,
                        java.awt.image.DataBufferByte buffByte)
                 throws SeException
Sets colormap in raster band instance.

Parameters:
colormap_type - as an int value
buffByte - a DataBufferByte value
Throws:
SeException - if an error occurs
See Also:
setColorMap(int, DataBuffer)

setColorMap

public void setColorMap(int colormap_type,
                        java.awt.image.DataBufferShort buffShort)
                 throws SeException
Sets colormap in raster band instance.

Parameters:
colormap_type - as an int value
buffShort - a DataBufferShort value
Throws:
SeException - if an error occurs
See Also:
setColorMap(int, DataBuffer)

setColorMap

public void setColorMap(int colormapType,
                        java.awt.image.DataBuffer colormapData)
                 throws SeException
Sets colormap in raster band instance.

The colormapType will determine the number of banks. The instanceof colormapData will determine the data type and the number of entries per bank.

Parameters:
colormapType - as an int value
colormapData - an awt.image.DataBuffer value as instanceof awt.image.DataBufferByte or awt.image.DataBufferShort.
Throws:
SeException - if an error occurs
See Also:
alter(), create(), getColorMap()