怎样运行地理处理工具 Geoprocessing & Geoprocessor & IGPProcess

本文详细介绍了如何在C#项目中利用ESRI.ArcGIS.Geoprocessing库执行地理处理工具,包括使用COM Interop程序集和托管程序集的方式。内容涵盖了创建geoprocessor对象、设置参数值、执行系统工具和自定义工具,以及通过IGPProcess接口运行工具。同时,还提及了如何设置地理处理环境变量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In this topic

How to run a geoprocessing tool(这个地方在仔细整理下!!)

Each geoprocessing tool has a fixed set of parameters that provide the tool with the information it needs for execution. Tools usually have input parameters that define the dataset or datasets that will typically be used to generate new output data. Parameters have the following important properties:
  • Name—Each tool parameter has a unique name.
  • Type—The type of data expected, such as a feature class, integer, string, and raster.
  • Required—Either a value must be provided for a parameter, or it is optional.
Each tool has a documentation page known as a tool reference page.For more information about parameters, see Interpreting a tool reference page.(Interpreting:解释。在这个页面介绍了怎么快速定位“工具”,找到工具名称和工具参数信息,一定要了解这个专题上的信息,你才能很好地使用ArcGIS的工具。其实,你在使用ArcMap的系统工具的时候,在工具的帮助文档里,就能找到那个工具的名称,别名,参数,还有部分的Python代码。)
When a tool is used in a program, its parameter values must be set correctly so it can execute when the program runs. The documentation of each tool clearly defines its parameters and properties. Once a valid set of parameter values is provided, the tool is ready to be executed.
Parameters are specified as strings or objects. Strings are text values that uniquely identify a parameter value, such as a path to a dataset or a keyword. Most tool parameters can be specified as a simple string. However, complex parameters, such as a spatial reference, can be easier to specify with an object. Each tool has its own parameter types.To get complete information on a particular tool, review the tool reference page. Interpreting a tool reference page explains how to read a tool reference page and extract information to use in .NET.
两种方法的区别:Geoprocessing & geoprocessor 
You can run a geoprocessing tool by using the Geoprocessing library methods or by the geoprocessor managed assembly methods. For information about the basic differences between the two approaches, seeExecuting tools. In both cases, the Execute method of the geoprocessor is called.
取消即终止功能通常设为null
The Execute method uses a null reference instead of an ITrackCancel interface. The ITrackCancel interface provides access to properties and methods that determine if a cancellation has been executed by the user and also allows developers to specify what actions constitute a cancellation. Both approaches are elaborated(详细阐述如下) with the following examples.

Using the geoprocessing assembly(是一个COM Interop程序集

The geoprocessing assembly is the Component Object Model (COM) interop of the Geoprocessing type library( 什么是COM Interop?COM Interop看上去象是介乎于COM和.Net之间的一条纽带,一座桥梁。 ). The Execute method of the IGeoProcessor2 interface of the library is used to run a tool.
The following are the generic steps to execute a tool:
  1. Add a reference toESRI.ArcGIS.Geoprocessingto your project. This is the
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值