nataraju

How to Display On Off Rasters in Mosaic Dataset?

Discussion created by nataraju on Dec 22, 2011
Hi,

Any one tried and succeeded to put on/off rasters in mosaic dataset.
I trid in vain, any one can help me out?


funGetDisplayOffOnRasters_inMosaicDataset(IRasterInfo rRasterInfo,IMosaicDataset pMDS )
{

IFeatureClass pFeatCls = pMDS.Catalog;
IFeature pFeat = pFeatCls.GetFeature(1);
IRasterCatalogItem catalogItem = (IRasterCatalogItem)pFeat;
IRasterDataset rRastDS = catalogItem.RasterDataset;

IMosaicFunctionArguments rasterFunctionArguments = (IMosaicFunctionArguments)
new MosaicFunctionArguments();
rasterFunctionArguments.RasterInfo = rRasterInfo;
rasterFunctionArguments.Catalog = pMDS.Catalog;  

IMosaicFunction mosFun = new MosaicFunctionClass();               
mosFun.WhereClause = "OBJECTID = " + pFeat.OID;
mosFun.LockRasterID = pFeat.OID.ToString();
mosFun.RasterFieldName = "Raster";

IRasterFunction pRasFun = mosFun as IRasterFunction;

IFunctionRasterDataset functionRasterDataset = new FunctionRasterDataset();
functionRasterDataset.Function = pRasFun; 
functionRasterDataset.Init(pRasFun, rasterFunctionArguments);
}

*******
Nataraju

Outcomes