ArcEngine GP栅格计算器以及表达式的写法描述

QQ交流群:607330463 GIS开发技术最强交流群

 

        /// <summary>
        /// GP栅格计算器
        /// </summary>
        /// <param name="expression">表达式</param>
        /// <param name="output_raster">输出地址</param>
        private void GPRasterCalculatorAnalyst(string expression, string output_raster)
        {
            //string a1 = "C:\\Users\\54061\\Documents\\ArcGIS\\Default.gdb" + "\\" + "Reclass_Extr2";
            //string a2 = "C:\\Users\\54061\\Documents\\ArcGIS\\Default.gdb" + "\\" + "Reclass_Slop1";
            //表达式规范如:string expression = "\"" + a1 + "\" + \"" + a2 + "\"";
            //记住表达式填写路径 两头要加 \"
            Geoprocessor GP = new Geoprocessor();
            GP.OverwriteOutput = true;
            //定义栅格计算器
            RasterCalculator RC = new RasterCalculator();
            RC.expression = expression;
            RC.output_raster = output_raster;
            try
            {
                GP.Execute(RC, null);
                object sev = null;
                MessageBox.Show(GP.GetMessages(ref sev));
            }
            catch (Exception ex)
            {
                object sev = null;
                MessageBox.Show(GP.GetMessages(ref sev));
            }
        }

ArcEngine  GP栅格计算器以及表达式的写法描述

GP写法的注意:肯可能突然弹出来这个问题,但是不影响,确定也能成功

ArcEngine  GP栅格计算器以及表达式的写法描述 ArcEngine  GP栅格计算器以及表达式的写法描述

 

上一篇:三级联动数据表db_nove.sql


下一篇:recover.panic.defer.2021.03.03