Exemple #1
0
        private IFunctionRasterDataset transform()
        {
            IRasterBandCollection rsBc = new RasterClass();

            for (int i = 0; i < coef.Length; i++)
            {
                double[] c                 = coef[i];
                double   intercept         = c[0];
                double   slope             = c[1];
                IFunctionRasterDataset tRs = rsUtil.getBand(transformRaster, i);
                IFunctionRasterDataset pRs = rsUtil.calcArithmaticFunction(tRs, slope, esriRasterArithmeticOperation.esriRasterMultiply);
                IFunctionRasterDataset fRs = rsUtil.calcArithmaticFunction(pRs, intercept, esriRasterArithmeticOperation.esriRasterPlus);
                IFunctionRasterDataset bRs = rsUtil.convertToDifFormatFunction(fRs, rsType);
                rsBc.AppendBand(((IRasterBandCollection)bRs).Item(0));
            }
            OutRaster = rsUtil.compositeBandFunction(rsBc);
            return(OutRaster);
        }