zoukankan      html  css  js  c++  java
  • gp工具的许可

    还是要在代码里许可

        static class Program
        {
            [STAThread]
            static void Main()
            {            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
                IAoInitialize aoInitialize = new AoInitialize();
                esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseUnavailable;
                licenseStatus = aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);
    
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
        }
    

    比如

            IGeoProcessorResult ret = null;
            private void button1_Click(object sender, EventArgs e)
            {
                string sInputPath = @"x:aa	est	est320902.gdbDLGXZDW";
                string sOutPutPath = @"x:aa	est	est320902.gdbDLGXWM_BUFFER_BAK";
                ESRI.ArcGIS.AnalysisTools.Buffer pBufferTool = new ESRI.ArcGIS.AnalysisTools.Buffer();
                pBufferTool.in_features = sInputPath;
                pBufferTool.out_feature_class = sOutPutPath;
                pBufferTool.buffer_distance_or_field = "BufferKD";
                pBufferTool.dissolve_option = "ALL";
                pBufferTool.line_side = "FULL";
                pBufferTool.line_end_type = "FLAT";
                Geoprocessor gp2 = new Geoprocessor();
                gp2.OverwriteOutput = true; 
                gp2.ToolExecuted += Gp2_ToolExecuted;   
                ret = gp2.ExecuteAsync(pBufferTool);
            }
    
            private void Gp2_ToolExecuted(object sender, ToolExecutedEventArgs e)
            {
                MessageBox.Show(ret.GetMessage(0));
            }
    

      

  • 相关阅读:
    大学生自学网
    如何保证主从复制数据一致性
    CDN
    后端 线上 服务监控 与 报警 方案2
    利用 Gearman 实现系统错误报警功能
    增量部署和全量部署
    后端线上服务监控与报警方案
    简析TCP的三次握手与四次分手
    301 和 302 对 SEO 的影响
    Linux 查看负载
  • 原文地址:https://www.cnblogs.com/yansc/p/10273417.html
Copyright © 2011-2022 走看看