ArcEngine开发问题

如何在VS2012开发环境中,调用ArcGIS中ArcToolBox的CreateFishnet功能,麻烦大家可以给个实例参考一下,谢谢!
已邀请:

朱新颖

赞同来自: williamed

下面代码可供参考:
 Geoprocessor GP = new Geoprocessor();
            ESRI.ArcGIS.DataManagementTools.CreateFishnet pFishnet = new ESRI.ArcGIS.DataManagementTools.CreateFishnet();

            pFishnet.cell_height = 0;
            pFishnet.cell_width = 0;
            pFishnet.number_columns = 50;
            pFishnet.number_rows = 50;
            pFishnet.out_feature_class = @"D:\test\test.gdb\createFish";
            pFishnet.origin_coord = "1637536.51 1215992.6167";
            pFishnet.y_axis_coord = "1637536.51 1216002.6167";
            pFishnet.corner_coord = "1637945.0369 1216870.9581";
            GP.OverwriteOutput = true;

            try
            {
                GP.Execute(pFishnet, null);
            }

            catch (Exception ex)
            {
                 // Print geoprocessing execution error messages.
                for (int i = 0; i < GP.MessageCount; i++)
                    MessageBox.Show(GP.GetMessage(i));
            }

williamed - GISer进行中

赞同来自:

好的,谢谢你的帮助

要回复问题请先登录注册