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_Johns\data.mdb\roads");
    parameters.Add(@"D:\St_Johns\data.mdb\roads_Buffer");
    parameters.Add("1000 Meters");

    // Execute the tool.
    gp.Execute("Buffer_analysis", parameters, null);
}
时间: 2024-11-05 17:18:24

Executing a system tool的相关文章

Arcengine调用GP服务

注需 2个引用的区别 D:\Program Files (x86)\ArcGIS\DeveloperKit10.1\DotNet\ESRI.ArcGIS.Geoprocessor.dll D:\Program Files (x86)\ArcGIS\DeveloperKit10.1\DotNet\ESRI.ArcGIS.Geoprocessing.dll 官网代码: Each geoprocessing tool has a fixed set of parameters that provide

《CS:APP》 chapter 8 Exceptional Control Flow 笔记

Exceptional Control Flow The program counter assumes a sequence of values a0,a1,...,an?1 where each ak is the address of some corresponding instruction Ik. Each transition from ak to ak +1 is called a control transfer. A sequence of such control tran

《CS:APP》 chapter 8 Exceptional Control Flow 注意事项

Exceptional Control Flow The program counter assumes a sequence of values a0,a1,...,an?1 where each ak is the address of some corresponding instruction Ik. Each transition from ak to ak +1 is called a control transfer. A sequence of such control tran

ToDoList

// ToDoListWnd.cpp : implementation file // #include "stdafx.h" #include "ToDoList.h" #include "ToDoListWnd.h" #include "ToolsCmdlineParser.h" #include "ToolsUserInputDlg.h" #include "Toolshelper.h&qu

PAN-OS 6.1 Open Source Software (OSS) Listing

https://www.paloaltonetworks.com/documentation/oss-listings/oss-listings/pan-os-oss-listings/pan-os-6-1-open-source-software-oss-listing NAME HOW INTEGRATED VERSION LICENSE TYPE USAGE MAKEDEV Standalone apps/libraries 3.23 GPLv2 A program used for cr

troubleshooting tools in JDK 7--转载

This chapter describes in detail the troubleshooting tools that are available in JDK 7. In addition, the chapter lists operating-system-specific tools that may be used in conjunction with these troubleshooting tools. Finally, the chapter explains how

CSE 421/521 – Operating Systems

Programming Assignment – 2CSE 421/521 – Operating SystemsDue: April 5th and April 19th @11:59 pm, 20191. PreparationBefore beginning your work, please read the following carefully:● Chapters 8-9 from Silberschatz (9th edition)● Lecture slides on Memo

Linux Context , Interrupts 和 Context Switching 说明【转】

转自:http://blog.csdn.net/tianlesoftware/article/details/6461207 一. 进程Context 定义 当一个进程在执行时, CPU的所有寄存器中的值.进程的状态以及堆栈中的内容,比如各个变量和数据,包括所有的寄存器变量.进程打开的文件.内存信息等.这些信息被称为该进程的上下文(Context). 一个进程的Context可以分为三个部分:用户级上下文.寄存器上下文以及系统级上下文: (1)用户级上下文: 正文.数据.用户堆栈以及共享存储区:

深入研究java.lang.Runtime类

深入研究java.lang.Runtime类 一.概述      Runtime类封装了运行时的环境.每个 Java 应用程序都有一个 Runtime 类实例,使应用程序能够与其运行的环境相连接.      一般不能实例化一个Runtime对象,应用程序也不能创建自己的 Runtime 类实例,但可以通过 getRuntime 方法获取当前Runtime运行时对象的引用.      一旦得到了一个当前的Runtime对象的引用,就可以调用Runtime对象的方法去控制Java虚拟机的状态和行为.