|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.datasourcesraster.RasterBand
public class RasterBand
A representation of a single band of a raster dataset on disk.
The RasterBand object represents an existing band of a raster dataset. This band may be the only band in a single raster dataset or one band in a multiband raster dataset.
A RasterBand can be obtained from a RasterDataset or a Raster using IRasterBandCollection::Item.
public IRasterBand accessRasterBand( IRasterDataset rasDataSet ){
try{
IRasterBandCollection rbColl = new IRasterBandCollectionProxy( rasDataSet );
System.out.println( “Number of bands in Raster: “ + rbColl.getCount() );
// get the first band of the raster
// band index must be less than or equal to rbColl.getCount() – 1
return rbColl.getItem(0);
}catch( Exception e ){}
}
Constructor Summary | |
---|---|
RasterBand(Object obj)
Construct a RasterBand using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
Object |
acquireCache()
Gets reference to edit cache. |
void |
addField(IField field)
Adds a field to this object class. |
void |
addIndex(IIndex index)
Adds an index to this object class. |
void |
alterHistogram(IRasterHistogram pHistogram)
Alters histogram. |
void |
alterStatistics(IRasterStatistics pStats)
Alters statistics. |
boolean |
canCopy()
Returns true if this dataset can be copied. |
boolean |
canDelete()
True if this dataset can be deleted. |
boolean |
canRename()
True if this dataset can be renamed. |
void |
commit()
Sends all pending changes to persistent storage. |
void |
computeStatisticsHistogram(int skipx,
int skipy,
Object ignoreValues,
boolean requireHistogram)
Calculates statistics and histogram for a given skip factor. |
void |
computeStatsAndHist()
Calculates statistics and histogram if not previously stored. |
void |
computeStatsHistogram(int pyramidLevel)
Calculates statistics and histogram from a given pyramid level. |
IDataset |
copy(String copyName,
IWorkspace copyWorkspace)
Copies this raster band to a new dataset with the specified name. |
void |
create()
Build raster pyramids for this raster. |
IRaster |
createDefaultRaster()
Creates a raster object with the default properties for this dataset. |
IPixelBlock |
createPixelBlock()
Create a compatible pixel block. |
IPixelBlock |
createPixelBlock(IPnt size)
Allocates a PixelBlock of size requested and type of this band. |
IRow |
createRow()
Creates a row in the database with a system assigned object ID and null property values. |
IRowBuffer |
createRowBuffer()
Creates a row buffer that can be used with an insert cursor. |
void |
delete()
Deletes this dataset. |
void |
deleteField(IField field)
Deletes a field from this object class. |
void |
deleteIndex(IIndex index)
Deletes an index from this object class. |
void |
deleteSearchedRows(IQueryFilter queryFilter)
Delete the Rows in the database selected by the specified query. |
void |
end()
Commits changes and stops double buffering. |
boolean |
equals(Object o)
Compare this object with another |
int |
findField(String name)
The index of the field with the specified name. |
void |
flush()
Flushes buffered data. |
String |
getAliasName()
The alias name of the object class. |
ITable |
getAttributeTable()
The attribute table of this raster band. |
String |
getBandname()
The name of this raster band. |
String |
getBrowseName()
The browse name of the dataset. |
String |
getCategory()
The category of the dataset. |
IRasterClassNames |
getClassNames()
The class names (titles). |
IUID |
getCLSID()
The GUID for the COM Class (CoClass) corresponding to instances of this object class. |
IRasterColormap |
getColormap()
The colormap of this raster band. |
String |
getCompleteName()
The full path of the RasterDataset. |
String |
getCompressionType()
The compression technique applied to this RasterDataset. |
IContrastTable |
getContrastTable()
The contrast look-up table of this band. |
IUID |
getEXTCLSID()
The GUID for the COM Class (CoClass) corresponding to the class extension for this object class. |
Object |
getExtension()
The extension for this object class. |
IPropertySet |
getExtensionProperties()
The extension properties for this object class. |
IEnvelope |
getExtent()
The extent of the Raster. |
IFields |
getFields()
The fields collection for this object class. |
String |
getFormat()
The format of this RasterRataset. |
IName |
getFullName()
The associated name object. |
int |
getHeight()
Height in pixels. |
IRasterHistogram |
getHistogram()
The histogram of this raster band. |
IIndexes |
getIndexes()
The indexes collection for this object class. |
IPropertySet |
getMetadata()
The PropertySet containing metadata. |
IPnt |
getMinimumSize()
The minimum raster pyramid size. |
String |
getName()
The name of the Dataset. |
INativeType |
getNativeType()
The native type. |
Object |
getNoDataValue()
Data value used to indicate invalid or excluded data. |
int |
getNumCacheRefs()
Number of outstanding cache references |
int |
getObjectClassID()
The unique ID for the object class. |
String |
getOIDFieldName()
The name of the field corresponding to the OID. |
int |
getPixelType()
Data type of the pixels. |
int |
getPrimaryField()
The primary field of the table. |
IPropertySet |
getPropertySet()
The set of properties for the dataset. |
IRasterDataset |
getRasterDataset()
The RasterDataset associated with this raster band. |
IRasterInfo |
getRasterInfo()
The raster information. |
IEnumRelationshipClass |
getRelationshipClasses(int role)
The relationship classes in which this object class participates in for the specified role. |
int |
getRepresentationType()
The suggested representation type. |
IRow |
getRow(int oID)
The row from the database with the specified object ID. |
ICursor |
getRows(Object oids,
boolean recycling)
The cursor of rows based on a set of object ids. |
String |
getSensorType()
The sensor type used for this RasterDataset. |
ISpatialReference |
getSpatialReference()
SpatialReference of the Raster. |
IRasterStatistics |
getStatistics()
The statistics of this raster band. |
IEnumDataset |
getSubsets()
Datasets contained within this dataset. |
int |
getTableType()
The class names of the table. |
int |
getType()
The type of the Dataset. |
int |
getUndoLevels()
Maximum number of reversible operations. |
int |
getWidth()
Width in pixels. |
IWorkspace |
getWorkspace()
The workspace containing this dataset. |
boolean |
hasColormap()
Indicates if this band has a colormap. |
void |
hasColormap(boolean[] b)
Indicates if this band has a colormap. |
int |
hashCode()
the hashcode for this object |
void |
hasStatistics(boolean[] b)
Indicates if this band has statistics. |
void |
hasTable(boolean[] b)
Indicates if this band has an attribute table. |
ICursor |
insert(boolean useBuffering)
Returns a cursor that can be used to insert new Rows. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isCanEditMetadata()
Indicates if metadata can be edited. |
boolean |
isDirectlyOpened()
Indicates if the band was opened directly. |
boolean |
isHasOID()
Indicates if the class has an object identity (OID) field. |
boolean |
isInteger()
Indicates if the data is integer. |
boolean |
isPresent()
Indicates whether pyramid layers exist. |
ICursor |
ITable_search(IQueryFilter queryFilter,
boolean recycling)
An object cursor that can be used to fetch row objects selected by the specified query. |
IPnt |
meanCellSize()
Returns the approximate cell size of the raster. |
void |
precalculateStats(Object index_list)
Calculates statistics and histograms for specified bands. |
void |
read(IPnt tlc,
IPixelBlock pxls)
Read a block of pixels starting from tlc (top left corner). |
void |
readBlock(int tx,
int ty,
int level,
IPixelBlock pPixelBlock)
Reads a raw pixel block. |
void |
rename(String name)
Renames this Dataset. |
int |
returnCache(Object cache)
Restores edit cache to previous state. |
int |
rowCount(IQueryFilter queryFilter)
The number of Rows selected by the specified query. |
ISelectionSet |
select(IQueryFilter queryFilter,
int selType,
int selOption,
IWorkspace selectionContainer)
A selection that contains the object ids selected by the specified query. |
void |
setBrowseName(String name)
The browse name of the dataset. |
void |
setColormap(IRasterColormap colormap)
The colormap of this raster band. |
void |
setContrastTable(IContrastTable cont)
The contrast look-up table of this band. |
void |
setExtent(IEnvelope ppExtent)
The extent of the Raster. |
void |
setHeight(int pVal)
Height in pixels. |
void |
setMetadata(IPropertySet ppPropertySet)
The PropertySet containing metadata. |
void |
setMinimumSize(IPnt ppVal)
The minimum raster pyramid size. |
void |
setNoDataValue(Object pVal)
Data value used to indicate invalid or excluded data. |
void |
setPixelType(int pVal)
Data type of the pixels. |
void |
setPrimaryField(int fieldIndex)
The primary field of the table. |
void |
setRepresentationType(int pVal)
The suggested representation type. |
void |
setSpatialReference(ISpatialReference ppSpref)
SpatialReference of the Raster. |
void |
setUndoLevels(int num_undo)
Maximum number of reversible operations. |
void |
setWidth(int pVal)
Width in pixels. |
void |
start()
Starts double buffering edits for undo support. |
void |
synchronize(int action,
int interval)
Updates metadata with the current properties; may create metadata if it doesn't already exist. |
int |
undo(int n)
Reverses last N changes. |
ICursor |
update(IQueryFilter queryFilter,
boolean recycling)
Returns a cursor that can be used to update Rows selected by the specified query. |
void |
updateSearchedRows(IQueryFilter queryFilter,
IRowBuffer buffer)
Update the Rows in the database selected by the specified query. |
void |
write(IPnt tlc,
IPixelBlock pxls)
Write a block of pixels starting from tlc (top left corner). |
void |
writeBlock(int tx,
int ty,
int level,
IPixelBlock pPixelBlock)
Writes a raw pixel block. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public RasterBand(Object obj) throws IOException
obj
to RasterBand
. *
RasterBand o = (RasterBand)obj; // will not work
RasterBand o = new RasterBand(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
RasterBand theRasterBand = (RasterBand) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void hasTable(boolean[] b) throws IOException, AutomationException
hasTable
in interface IRasterBand
b
- The b (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void hasStatistics(boolean[] b) throws IOException, AutomationException
hasStatistics
in interface IRasterBand
b
- The b (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void hasColormap(boolean[] b) throws IOException, AutomationException
hasColormap
in interface IRasterBand
b
- The b (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterStatistics getStatistics() throws IOException, AutomationException
getStatistics
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void computeStatsAndHist() throws IOException, AutomationException
computeStatsAndHist
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterHistogram getHistogram() throws IOException, AutomationException
getHistogram
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterColormap getColormap() throws IOException, AutomationException
getColormap
in interface IRasterBand
getColormap
in interface IRasterBandColormap
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITable getAttributeTable() throws IOException, AutomationException
getAttributeTable
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterClassNames getClassNames() throws IOException, AutomationException
getClassNames
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterDataset getRasterDataset() throws IOException, AutomationException
getRasterDataset
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getRepresentationType() throws IOException, AutomationException
getRepresentationType
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRepresentationType(int pVal) throws IOException, AutomationException
setRepresentationType
in interface IRasterBand
pVal
- A com.esri.arcgis.datasourcesraster.rstRepresentationType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IContrastTable getContrastTable() throws IOException, AutomationException
This method should not be used by application developers.
getContrastTable
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setContrastTable(IContrastTable cont) throws IOException, AutomationException
setContrastTable
in interface IRasterBand
cont
- A reference to a com.esri.arcgis.datasourcesraster.IContrastTable (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canCopy() throws IOException, AutomationException
canCopy
in interface IRasterBand
canCopy
in interface IDataset
canCopy
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataset copy(String copyName, IWorkspace copyWorkspace) throws IOException, AutomationException
copy
in interface IRasterBand
copy
in interface IDataset
copy
in interface IRasterDataset
copyName
- The copyName (in)copyWorkspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBandname() throws IOException, AutomationException
getBandname
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDirectlyOpened() throws IOException, AutomationException
This method should not be used by application developers.
isDirectlyOpened
in interface IRasterBand
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterStatistics(IRasterStatistics pStats) throws IOException, AutomationException
Alters the statistics of the raster band with the given raster statistics.
alterStatistics
in interface IRasterBandEdit
pStats
- A reference to a com.esri.arcgis.datasourcesraster.IRasterStatistics (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterHistogram(IRasterHistogram pHistogram) throws IOException, AutomationException
Alters the histogram of the raster band with the given raster histogram
alterHistogram
in interface IRasterBandEdit
pHistogram
- A reference to a com.esri.arcgis.datasourcesraster.IRasterHistogram (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void computeStatsHistogram(int pyramidLevel) throws IOException, AutomationException
computeStatsHistogram
in interface IRasterBandEdit
pyramidLevel
- The pyramidLevel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void computeStatisticsHistogram(int skipx, int skipy, Object ignoreValues, boolean requireHistogram) throws IOException, AutomationException
computeStatisticsHistogram
in interface IRasterBandEdit2
skipx
- The skipx (in)skipy
- The skipy (in)ignoreValues
- A Variant (in)requireHistogram
- The requireHistogram (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INativeType getNativeType() throws IOException, AutomationException
getNativeType
in interface INativeTypeInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getWidth() throws IOException, AutomationException
getWidth
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setWidth(int pVal) throws IOException, AutomationException
setWidth
in interface IRasterProps
pVal
- The pVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHeight() throws IOException, AutomationException
getHeight
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHeight(int pVal) throws IOException, AutomationException
setHeight
in interface IRasterProps
pVal
- The pVal (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPixelType() throws IOException, AutomationException
getPixelType
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPixelType(int pVal) throws IOException, AutomationException
setPixelType
in interface IRasterProps
pVal
- A com.esri.arcgis.geodatabase.rstPixelType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getNoDataValue() throws IOException, AutomationException
getNoDataValue
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setNoDataValue(Object pVal) throws IOException, AutomationException
setNoDataValue
in interface IRasterProps
pVal
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPnt meanCellSize() throws IOException, AutomationException
meanCellSize
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isInteger() throws IOException, AutomationException
isInteger
in interface IRasterProps
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
getSpatialReference
in interface IRasterProps
getSpatialReference
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSpatialReference(ISpatialReference ppSpref) throws IOException, AutomationException
setSpatialReference
in interface IRasterProps
ppSpref
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
getExtent
in interface IRasterProps
getExtent
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExtent(IEnvelope ppExtent) throws IOException, AutomationException
setExtent
in interface IRasterProps
ppExtent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
getName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getFullName() throws IOException, AutomationException
getFullName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getBrowseName() throws IOException, AutomationException
getBrowseName
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBrowseName(String name) throws IOException, AutomationException
setBrowseName
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getType() throws IOException, AutomationException
// Assume we have a reference to an IfeatureClass (pFeatureClass) IDataset pDataset = null;
pDataset = new IDatasetProxy(pFeatureClass);
System.out.println(pDataset.getName() + " " + pDataset.getType());
if(pFeatureClass != null){
pDataset = pFeatureClass.getFeatureDataset();
System.out.println(pDataset.getName() + " " + pDataset.getType());
}
pDataset = new IDatasetProxy(pDataset.getWorkspace());
System.out.println(pDataset.getName() + " " +
pDataset.getType());
getType
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCategory() throws IOException, AutomationException
IDataset::Category returns a description of the category of the dataset. The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog. The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".
The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.
getCategory
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDataset getSubsets() throws IOException, AutomationException
The Subsets property returns other Dataset objects contained in this dataset.
IDataset::Subsets is not supported for Graph objects such as a Geometric Network. To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.
getSubsets
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace getWorkspace() throws IOException, AutomationException
The Workspace property returns the containing workspace for this dataset.
getWorkspace
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getPropertySet() throws IOException, AutomationException
The PropertySet property is used to return any additional intrinsic properties (but not metadata properties) that may apply to the dataset. One use of this property is to distinguish between the types of File Geodatabase datafile formats. If called on a Feature Class or Table in a File Geodatabase the Datafile Format property can either be esriFGDBStandardDatafile or esriFGDBCompressedDatafile.
Most datasets do not implement this property and will either raise an error or return a null value if it's called. There are a handful of exceptions that will return property sets; these include the datasets from file geodatabases (as mentioned above) and coverages.
Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.
IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.
getPropertySet
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canDelete() throws IOException, AutomationException
The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.
canDelete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void delete() throws IOException, AutomationException
Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.
delete
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canRename() throws IOException, AutomationException
The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.
canRename
in interface IDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rename(String name) throws IOException, AutomationException
IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network. In addition, certain feature classes, such as network feature classes, cannot be renamed.
rename
in interface IDataset
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRow createRow() throws IOException, AutomationException
The CreateRow method creates a new row in the underlying database with a system assigned object id value. A row object representing the created row is returned to the caller. The row object returned has the system assigned object ID as the value of the OIDField. All other fields are initialized to null values if they can be made null and to built-in default values appropriate to the type of the field if they cannot be made null.
The caller is responsible for setting the desired field values into the row and calling the Store method on the row. If the table represents an object class with subtypes, then it is the caller’s responsibility to set the default subtype code into the row and call the InitDefaultValues method on the row before storing, if that is the desired result. For tables without object behavior, insert cursors offer a more efficient way for inserting new rows.
createRow
in interface ITable
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRow getRow(int oID) throws IOException, AutomationException
The GetRow method returns an existing row object, given its object ID value. The caller can query the returned row object for additional object specific interfaces. The retrieved row may be modified; calling Store on the row object after changing it will trigger messages to related objects and will mark the row for committing to the database.
getRow
in interface ITable
oID
- The oID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICursor getRows(Object oids, boolean recycling) throws IOException, AutomationException
The GetRows method returns a cursor that may be used to retrieve a set of rows specified by the input array of object id values. See the description of the Search method to understand the meaning of the recycling parameter. It is far more efficient to retrieve a set of rows using the GetRows method than it is to retrieve each individual row using the GetRow method. The retrieved rows may be modified; Store should be called on the row objects after changing them.
The oids parameter should be passed an integer array. For example:
// Get a recycling cursor for the OID array.
int[] oids = new int[] { 10844, 10853, 10871 };
ICursor cursor = table.getRows(oids, true);
getRows
in interface ITable
oids
- A Variant (in)recycling
- The recycling (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRowBuffer createRowBuffer() throws IOException, AutomationException
The CreateRowBuffer method creates a new row buffer object in memory and returns it to the caller. No row is created in the database. The returned row buffer does not have an object ID value. The caller can set values into the row buffer and use it as an argument to the InsertRow method on an insert cursor; the latter is obtained by calling the Insert method on the Table.
createRowBuffer
in interface ITable
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updateSearchedRows(IQueryFilter queryFilter, IRowBuffer buffer) throws IOException, AutomationException
This method will edit the rows matching the query filter's constraints. The values in each row will be replaced with the corresponding field's value in the provided row buffer. The fields being edited should be specified in the query filter's SubFields property. If the row buffer contains null values, and the SubFields property is not properly set, the row's values will be overwritten with the row buffer's null values.
updateSearchedRows
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)buffer
- A reference to a com.esri.arcgis.geodatabase.IRowBuffer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteSearchedRows(IQueryFilter queryFilter) throws IOException, AutomationException
deleteSearchedRows
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int rowCount(IQueryFilter queryFilter) throws IOException, AutomationException
rowCount
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICursor ITable_search(IQueryFilter queryFilter, boolean recycling) throws IOException, AutomationException
ITable_search
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)recycling
- The recycling (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICursor update(IQueryFilter queryFilter, boolean recycling) throws IOException, AutomationException
The Update method returns an update cursor that can be used to update or delete rows. It offers somewhat faster performance than multiple calls to Store or Delete on row objects fetched using a non-recycling search cursor for tables storing simple rows and simple features. There is no difference in performance for complex objects and features.
When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.
update
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)recycling
- The recycling (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICursor insert(boolean useBuffering) throws IOException, AutomationException
The Insert method returns an insert cursor that can be used to bulk insert rows. It offers significantly faster performance than multiple calls to CreateRow and Store for tables storing simple rows and simple features (that is, for tables whose CLSID is esriGeoDatabase.Row, esriGeoDatabase.Object, or esriGeoDatabase.Feature).
Insert cursors on tables containing complex objects use the CreateRow and Store methods to achieve polymorphism, and there is no difference in performance in these cases.
When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.
insert
in interface ITable
useBuffering
- The useBuffering (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISelectionSet select(IQueryFilter queryFilter, int selType, int selOption, IWorkspace selectionContainer) throws IOException, AutomationException
The Select method returns a selection set that holds either row IDs or row objects from the Table depending on the selection option. Multiple selection sets can be created on the same table. It is up to a client application or object to keep a reference on created selections and use them as appropriate. For example, a FeatureLayer creates and uses selections on a FeatureClass (a type of Table).
The selType parameter determines the type of selection set that will be created: an ID set, a snapshot, or a hybrid. See the ISelectionSet interface for a comparison of the three types.
When calling Select the selectionContainer parameter is no longer required. A null value should be passed as this parameter.
select
in interface ITable
queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)selType
- A com.esri.arcgis.geodatabase.esriSelectionType constant (in)selOption
- A com.esri.arcgis.geodatabase.esriSelectionOption constant (in)selectionContainer
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int findField(String name) throws IOException, AutomationException
If FindField returns -1, the Field could not be found in the Fields collection.
Developers working with SDE should be aware of qualified field names and their impact on calls to FindField. For more information, see the IFields2 interface.
findField
in interface IClass
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFields getFields() throws IOException, AutomationException
getFields
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IIndexes getIndexes() throws IOException, AutomationException
getIndexes
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addField(IField field) throws IOException, AutomationException
Prior to adding a new field to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
Attempting to add a new field that does not allow null values will fail, if the class already has data in it. The only solution is to recreate the class with the non-nullable field, then copy the rows from the original class into the new class.
addField
in interface IClass
field
- A reference to a com.esri.arcgis.geodatabase.IField (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteField(IField field) throws IOException, AutomationException
DeleteField removes the specified field from a table, object class or feature class. Fields that are required by the Geodatabase and cannot be removed include:
Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
// Assume we have a reference to a FeatureClass (pFC) IFields pFields; IField pField; pFields = pFC.getFields(); pField = pFields.getField(pFields.findField("MyField")); pFC.deleteField(pField);
deleteField
in interface IClass
field
- A reference to a com.esri.arcgis.geodatabase.IField (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addIndex(IIndex index) throws IOException, AutomationException
Prior to adding a new index to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
addIndex
in interface IClass
index
- A reference to a com.esri.arcgis.geodatabase.IIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteIndex(IIndex index) throws IOException, AutomationException
Prior to deleting an index from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
deleteIndex
in interface IClass
index
- A reference to a com.esri.arcgis.geodatabase.IIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasOID() throws IOException, AutomationException
isHasOID
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getOIDFieldName() throws IOException, AutomationException
getOIDFieldName
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IUID getCLSID() throws IOException, AutomationException
getCLSID
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IUID getEXTCLSID() throws IOException, AutomationException
getEXTCLSID
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getExtension() throws IOException, AutomationException
getExtension
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getExtensionProperties() throws IOException, AutomationException
getExtensionProperties
in interface IClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getObjectClassID() throws IOException, AutomationException
Returns the unique ID of the object class.
Each feature class or table registered with the geodatabase is an object class. Object classes have a unique ID which distinguishes them from other object classes in the geodatabase. The ObjectClassID property returns this ID as a long. The object class ID is assigned by the system when the class is created, or registered with the geodatabase, it cannot be modified.
Those feature classes and tables that are in the database, but not registered with the geodatabase will always have an object class ID of -1.
getObjectClassID
in interface IObjectClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRelationshipClass getRelationshipClasses(int role) throws IOException, AutomationException
getRelationshipClasses
in interface IObjectClass
role
- A com.esri.arcgis.geodatabase.esriRelRole constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getAliasName() throws IOException, AutomationException
Returns the alias name for the object class.
Object classes in a geodatabase can have between one and three names. The name of the object class, which is the same as the name of the table in the DBMS in which the objects in the object class are stored, the alias name which the user can set for display purposes in end user applications. The third name is the model name which is a tool for developers of custom objects to use to guarantee the names of objects independent of the true name or alias name.
The AliasName property returns the alias name for the object class. If the object class has no alias name, then AliasName will return the name of the object class (fully qualified if on ArcSDE). The alias name can be modified using the IClassSchemEdit interface.
getAliasName
in interface IObjectClass
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getFormat() throws IOException, AutomationException
getFormat
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSensorType() throws IOException, AutomationException
getSensorType
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCompressionType() throws IOException, AutomationException
getCompressionType
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRaster createDefaultRaster() throws IOException, AutomationException
The CreateDefaultRaster method creates a Raster that has a square cell size and contains only three raster bands if the dataset has more than three bands. The three bands are the default bands used in raster RGB renderer and are determined by the settings for default raster behavior made on the RasterDefaultsEnv object in esriCarto library.
createDefaultRaster
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void precalculateStats(Object index_list) throws IOException, AutomationException
precalculateStats
in interface IRasterDataset
index_list
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCompleteName() throws IOException, AutomationException
getCompleteName
in interface IRasterDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTableType() throws IOException, AutomationException
getTableType
in interface IRasterTable
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPrimaryField() throws IOException, AutomationException
getPrimaryField
in interface IRasterTable
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPrimaryField(int fieldIndex) throws IOException, AutomationException
setPrimaryField
in interface IRasterTable
fieldIndex
- The fieldIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPresent() throws IOException, AutomationException
isPresent
in interface IRasterPyramid
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMinimumSize(IPnt ppVal) throws IOException, AutomationException
setMinimumSize
in interface IRasterPyramid
ppVal
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPnt getMinimumSize() throws IOException, AutomationException
getMinimumSize
in interface IRasterPyramid
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void create() throws IOException, AutomationException
create
in interface IRasterPyramid
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPixelBlock createPixelBlock(IPnt size) throws IOException, AutomationException
CreatePixelBlock method only initializes the properties of a pixel block, such as dimension, pixel type etc. Read method of this interface should be used to read pixels into the pixel block.
createPixelBlock
in interface IRawPixels
size
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void read(IPnt tlc, IPixelBlock pxls) throws IOException, AutomationException
read
in interface IRawPixels
tlc
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)pxls
- A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void write(IPnt tlc, IPixelBlock pxls) throws IOException, AutomationException
write
in interface IRawPixels
tlc
- A reference to a com.esri.arcgis.geodatabase.IPnt (in)pxls
- A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object acquireCache() throws IOException, AutomationException
acquireCache
in interface IRawPixels
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int returnCache(Object cache) throws IOException, AutomationException
returnCache
in interface IRawPixels
cache
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getNumCacheRefs() throws IOException, AutomationException
getNumCacheRefs
in interface IRawPixels
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getMetadata() throws IOException, AutomationException
The variable to hold the data must be of IPropertySet data type.
The metadata property is frequently used to save, or update, changes to metadata documents that have taken place through methods available on the IPropertySet, IXmlPropertySet, and/or IXmlPropertySet2 interfaces.
getMetadata
in interface IMetadata
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMetadata(IPropertySet ppPropertySet) throws IOException, AutomationException
setMetadata
in interface IMetadata
ppPropertySet
- A reference to a com.esri.arcgis.system.IPropertySet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void synchronize(int action, int interval) throws IOException, AutomationException
The Synchronize method is used to extract metadata properties from an object and write those properties to the metadata .xml. Depending on the value of the esriMetaSyncAction, the Synchronize method may generate a new set of metadata if it doesn't already exist.
The following actions will result in synchronization given each of the listed conditions:
Action | Metadata status | Esri/Sync element | Interval parameter |
---|---|---|---|
esriMSAAccessed | Doesn't matter | Must not be FALSE | Must be less than actual interval |
esriMSAAlways | Doesn't matter | Doesn't matter | Doesn't matter |
esriMSACreated | Must not exist | Must not be FALSE | Must be less than actual interval |
esriMSANotCreated | Must exist | Must not be FALSE | Must be less than actual interval |
esriMSAOverwrite | Doesn't matter | Doesn't matter | Doesn't matter |
The difference between esriMSAAlways and esriMSAOverwrite lies in which elements are synchronized. esriMSAAlways will honor the removal or value change of an element's Sync attribute (to disable synchronization), whereas using esriMSAOverwrite is equivalent to setting the IXmlPropertySet2.OverwriteSyncAttribute to true for the metadata's property set, meaning that even elements without a Sync attribute of TRUE will be synchronized.
synchronize
in interface IMetadata
action
- A com.esri.arcgis.geodatabase.esriMetadataSyncAction constant (in)interval
- The interval (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCanEditMetadata() throws IOException, AutomationException
This property is available to those objects that support metadata.
isCanEditMetadata
in interface IMetadataEdit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUndoLevels(int num_undo) throws IOException, AutomationException
setUndoLevels
in interface IRasterTransaction
num_undo
- The num_undo (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void commit() throws IOException, AutomationException
commit
in interface IRasterTransaction
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void start() throws IOException, AutomationException
start
in interface IRasterTransaction
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void end() throws IOException, AutomationException
end
in interface IRasterTransaction
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int undo(int n) throws IOException, AutomationException
undo
in interface IRasterTransaction
n
- The n (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getUndoLevels() throws IOException, AutomationException
getUndoLevels
in interface IRasterTransaction
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRasterInfo getRasterInfo() throws IOException, AutomationException
getRasterInfo
in interface IRawBlocks
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPixelBlock createPixelBlock() throws IOException, AutomationException
createPixelBlock
in interface IRawBlocks
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void readBlock(int tx, int ty, int level, IPixelBlock pPixelBlock) throws IOException, AutomationException
readBlock
in interface IRawBlocks
tx
- The tx (in)ty
- The ty (in)level
- The level (in)pPixelBlock
- A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeBlock(int tx, int ty, int level, IPixelBlock pPixelBlock) throws IOException, AutomationException
writeBlock
in interface IRawBlocks
tx
- The tx (in)ty
- The ty (in)level
- The level (in)pPixelBlock
- A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void flush() throws IOException, AutomationException
flush
in interface IRawBlocks
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean hasColormap() throws IOException, AutomationException
hasColormap
in interface IRasterBandColormap
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setColormap(IRasterColormap colormap) throws IOException, AutomationException
setColormap
in interface IRasterBandColormap
colormap
- A reference to a com.esri.arcgis.geodatabase.IRasterColormap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |