Building a raster attribute table
By default, the raster attribute table will contain VALUE and COUNT fields. If a table is assigned to the raster dataset as its raster attribute table, it will be attached to the raster dataset and be part of the dataset. See the following code example:
[Java]
static void buildRasterAttributeTable(IRasterDataset rasterDataset, ITable table)
throws Exception{
//Cast to IRasterDatasetEdit2 for building a raster attribute table.
IRasterDatasetEdit2 rasterDatasetEdit = new IRasterDatasetEdit2Proxy
(rasterDataset);
//Build default raster attribute table with VALUE and COUNT fields.
if (table == null){
rasterDatasetEdit.buildAttributeTable();
}
else{
//Assign the given table as the raster attribute table.
rasterDatasetEdit.alterAttributeTable(table);
}
}
Development licensing | Deployment licensing |
---|---|
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |
Engine Developer Kit | Engine Runtime |