zoukankan      html  css  js  c++  java
  • Executing a system tool

    Executing a system tool

    The following code example shows the execution of the Buffer tool from the Analysis tools toolbox. The required parameters for the tool are defined. In this case, strings are used to define the input, output, and buffer distance properties so the call to the tool is easier to read.
    [C#]
    // Add references to esriSystem for licensing and IVariantArray.
    using ESRI.ArcGIS.esriSystem;
    // Add a reference to the geoprocessing namespace.
    using ESRI.ArcGIS.Geoprocessing;
    
    private static void RunBuffer()
    {
        // Create the geoprocessor.
        IGeoProcessor2 gp = new GeoProcessorClass();
    
        // Create an IVariantArray to hold the parameter values.
        IVariantArray parameters = new VarArrayClass();
    
        // Populate the variant array with parameter values.
        parameters.Add(@"D:St_Johnsdata.mdb
    oads");
        parameters.Add(@"D:St_Johnsdata.mdb
    oads_Buffer");
        parameters.Add("1000 Meters");
    
        // Execute the tool.
        gp.Execute("Buffer_analysis", parameters, null);
    }
  • 相关阅读:
    hbase java api
    hbase
    误删/usr文件夹解决办法
    死锁问题 代码示例
    H2O 生成 多线程并发控制 Semaphore
    多线程 打印零与奇偶数
    多线程交替打印 采用Semaphore
    多线程按顺序执行
    判断回文数
    整数反转
  • 原文地址:https://www.cnblogs.com/gisoracle/p/6679717.html
Copyright © 2011-2022 走看看