Esempio n. 1
0
 public void Bind(object pArgument)
 {
     if (pArgument is tobitFunctionArguments)
     {
         tobitFunctionArguments arg = (tobitFunctionArguments)pArgument;
         inrsBandsCoef = arg.InRasterCoefficients;
         slopes        = arg.Slopes;
         outrs         = arg.OutRaster;
         censored      = arg.CensoredValue;
         myFunctionHelper.Bind(outrs);
         myFunctionHelperCoef.Bind(inrsBandsCoef);
         myRasterInfo = myFunctionHelper.RasterInfo;
         myPixeltype  = myRasterInfo.PixelType;
         myValidFlag  = true;
     }
     else
     {
         throw new System.Exception("Incorrect arguments object. Expected: tobitnFunctionArguments");
     }
 }
 public IFunctionRasterDataset calcCensoredRegressFunction(object inRaster, List<float[]> slopes,float lowerLimit=0)
 {
     IFunctionRasterDataset rRst = createIdentityRaster(inRaster);
     string tempAr = funcDir + "\\" + FuncCnt + ".afr";
     IFunctionRasterDataset frDset = new FunctionRasterDatasetClass();
     IFunctionRasterDatasetName frDsetName = new FunctionRasterDatasetNameClass();
     frDsetName.FullName = tempAr;
     frDset.FullName = (IName)frDsetName;
     IRasterFunction rsFunc = new FunctionRasters.tobitFunctionDataset();
     FunctionRasters.tobitFunctionArguments args = new FunctionRasters.tobitFunctionArguments(this);
     args.InRasterCoefficients = rRst;
     args.Slopes = slopes;
     args.CensoredValue = lowerLimit;
     frDset.Init(rsFunc, args);
     return frDset;
 }