How to run a geoprocessing tool
How to run a geoprocessing tool |
In this topic
Running a geoprocessing tool
- Name—Each tool parameter has a unique name.
- Type—The type of data expected, such as feature class, integer, string, and raster.
- Required—Either a value must be provided for a parameter or it is optional.
[C#]
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.AnalysisTools; public void SampleBufferTool()
{ // Initialize the geoprocessor.
Geoprocessor GP = new Geoprocessor(); ESRI.ArcGIS.AnalysisTools.Buffer bufferTool = new
ESRI.ArcGIS.AnalysisTools.Buffer(); bufferTool.in_features = @"D:\St_Johns\data.mdb\roads_Buffer";
bufferTool.out_feature_class = @"D:\St_Johns\data.mdb\roads";
bufferTool.buffer_distance_or_field = "distance"; GP.Execute(bufferTool, null); }
[VB.NET]
Imports ESRI.ArcGIS.Geoprocessor
Imports ESRI.ArcGIS.AnalysisTools Public Sub SampleBufferTool() ' Initialize the geoprocessor.
Dim GP As Geoprocessor = New Geoprocessor() Dim bufferTool As ESRI.ArcGIS.AnalysisTools.Buffer = New ESRI.ArcGIS.AnalysisTools.Buffer() bufferTool.in_features = "D:\St_Johns\data.mdb\roads_Buffer"
bufferTool.out_feature_class = "D:\St_Johns\data.mdb\roads"
bufferTool.buffer_distance_or_field = "distance" GP.Execute(bufferTool, Nothing) End Sub
| Toolbox names | Namespaces |
| 3D Analyst tools | ESRI.ArcGIS.Analyst3DTools |
| Analysis tools | ESRI.ArcGIS.AnalysisTools |
| Conversion tools | ESRI.ArcGIS.ConversionTools |
| Data Management tools | ESRI.ArcGIS.DataManagementTools |
| Cartography tools | ESRI.ArcGIS.CartographyTools |
| Coverage tools | ESRI.ArcGIS.CoverageTools |
| Geocoding tools | ESRI.ArcGIS.GeocodingTools |
| Geostatistical Analyst tools | ESRI.ArcGIS.GeostatisticalAnalystTools |
| Linear Referencing tools | ESRI.ArcGIS.LinearReferencingAnalystTools |
| Multidimension tools | ESRI.ArcGIS.MultidimensionTools |
| Network Analyst tools | ESRI.ArcGIS.NetworkAnalystTools |
| Samples | ESRI.ArcGIS.SamplesTools |
| Spatial Analyst tools | ESRI.ArcGIS.SpatialAnalystTools |
| Spatial Statistics tools | ESRI.ArcGIS.SpatialStatisticsTools |
Running custom geoprocessing tools
Executing a tool by name
[C#]
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.esriSystem; public void SampleCalculateBestPathTool()
{ // Initialize the geoprocessor.
Geoprocessor GP = new Geoprocessor(); // Add the BestPath toolbox.
GP.AddToolbox(@"C:\SanDiego\BestPath.tbx"); // Generate the array of parameters.
IVariantArray parameters = new VarArrayClass();
parameters.Add(@"C:\SanDiego\source.shp");
parameters.Add(@"C:\SanDiego\destination.shp");
parameters.Add(@"C:\SanDiego\bestpath.shp"); // Execute the model tool by name.
GP.Execute("CalculateBestPath", parameters, null); }
[VB.NET]
Imports ESRI.ArcGIS.Geoprocessor
Imports ESRI.ArcGIS.esriSystem Public Sub SampleCalculateBestPathTool() ' Initialize the geoprocessor.
Dim GP As Geoprocessor = New Geoprocessor() ' Add the BestPath toolbox.
GP.AddToolbox("C:\SanDiego\BestPath.tbx") ' Generate the array of parameters.
Dim parameters As IVariantArray = New VarArrayClass()
parameters.Add("C:\SanDiego\source.shp")
parameters.Add("C:\SanDiego\destination.shp")
parameters.Add("C:\SanDiego\bestpath.shp") ' Execute the model tool by name.
GP.Execute("CalculateBestPath", parameters, Nothing) End Sub
How to run a geoprocessing tool的更多相关文章
- Unable to run mksdcard SDK tool.
Ubuntu 14.04,安装android studio后运行出错,sdk manager不能正常运行 Unable to run mksdcard SDK tool. 原因,缺少运行需要的库:li ...
- ubuntu15.10运行android studio出错unable to run mksdcard sdk tool
问题:ubuntu运行android studio出错unable to run mksdcard sdk tool 系统版本:系统是ubuntu 15.10 64位 确认原因:缺少lib 解决方法: ...
- Android studio Unable to run mksdcard SDK tool
/******************************************************************************************** * Andr ...
- Create a geoprocessing tool to buffer a layer and retrieve messages____sync
using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropSer ...
- android studio 安装报错 unable to run mksdcard sdk tool
搜了一下原来缺少这个 sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
- ubuntu运行android studio出错unable to run mksdcard sdk tool
原因:缺少lib 解决方法: sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6 完美解决.
- centos7安装android studio遇到Unable to run mksdcard sdk tool
centos系统为最小化安装,所以安装新软件时缺少许多依赖包,Android Studio下载的mksdcard是32位的,而系统是64位的,所以需要安装支持32位软件的依赖包. sudo yum i ...
- GP中Geoprocessor.Execute(string name, IVariantArray parameters, ITrackCancel trackCancel)
在做一个项目的过程中,发现GP运算方法 Execute(string name, IVariantArray parameters, ITrackCancel trackCancel) 与Execut ...
- The Topo to Raster tool returns errors 010235 and 010067转
Problem: The Topo to Raster tool returns errors 010235 and 010067 Description The Topo to Raster geo ...
随机推荐
- eclipse中配置maven
http://jingyan.baidu.com/article/db55b609a994114ba20a2f56.html
- Linux下PHP+MYSQL+APACHE配置方法
apache: http://www.apache.org mysql: http://www.mysql.com php: http://www.php.net/downloads.php g ...
- 计算缓存文件大小、清除缓存的Cell
计算缓存文件大小 - (void)getCacheSize { // 总大小 unsigned long long size = 0; // 获得缓存文件夹路径 NSString *cachesPat ...
- Bug跟踪方法
Bug跟踪函数调用方法 StackTraceElement mSte = new Exception().getStackTrace()[1]; Log.e("mmm", mSt ...
- 关于eclipse删除servers之后,不能新建其所对应版本的Servers
无法从以下方式,添加Tomcat服务器. 其中ServerName是被置为灰色的,无法编辑. 如何解决 1. 关闭Eclipse 2. 打开WorkSpace所在的位置. {workspa ...
- PowerShell脚本自动设置安卓手机wifi代理
在实际测试工作中,经常要将安卓手机通过wifi代理的形式连接到本机的fiddler或charles服务器代理进行抓包测试.最近一直在想,有没有什么方法可以自动设置安卓手机的wifi代理,曾经想通过修改 ...
- 【前端】我的Gulp配置
2. gulp + browserify /** * File Name: gulpfile.js */ // 引入 gulp var gulp = require('gulp'); // 引入组件 ...
- JavaScript 的面向对象
一.JS 模块包装格式都用过哪些,CommonJS.AMD.CMD.定义一个JS 模块代码,最精简的格式是怎样. js模块化开发的起源. CommonJs原来是叫ServerJs,从名字可以看出是专攻 ...
- Zabbix3.x安装图解教程
准备知识: Zabbix3.x比较之前的2.0界面有了很大的变化,但是安装部署过程与2.x基本完全一样. 1.Zabbix2.x安装图解教程 http://www.osyunwei.com/archi ...
- jQuery EasyUI教程之datagrid应用(三)
今天继续之前的整理,上篇整理了datagrid的数据显示及其分页功能 获取数据库数据显示在datagrid中:jQuery EasyUI教程之datagrid应用(一) datagrid实现分页功能: ...