在AO中使用Geoprocessor(ESRI.ArcGIS.Geoprocessor)

1。观察arcmap中的使用方法,明确各参数意义。

2。arctoolbox中参数对应为features/feature layer的(即需要在下拉菜单中选择,需要首先加载到arcmap上的),首先使用MakeFeatureLayer:

Geoprocessor gp=new Geoprocessor();

MakeFeatureLayer mfl=new MakeFeatureLayer();
mfl.in_features=@"e:\test.shp";
mfl.out_layer="test"; //feature layer name gp.Execute(mfl,null);

然后在调用其他gp的时候就可以直接使用此featureLayer:

RepairGeometry rg=new RepairGeometry();
rg.in_features="test";
gp.Execute(rg,null);

3.如gp执行错误时,可打印消息:

int count=gp.MessageCount;
for(int i=0;i<count;i++)
{
Console.WriteLine(gp.GetMessage(i));
}

Geoprocessor 使用的更多相关文章

  1. ArcGIS API for JavaScript 4.2学习笔记[28] 可视域分析【使用Geoprocessor类】

    想知道可视域分析是什么,就得知道可视域是什么 我们站在某个地方,原地不动转一圈能看到的所有事物就叫可视域.当然平地就没什么所谓的可视域. 如果在山区呢?可视范围就会被山体挡住了.这个分析对军事上有十分 ...

  2. ArcGIS API for JavaScript 4.2学习笔记[29] 热点(密度)分析——以报警频率为例【使用Geoprocessor类】

    这个就颇有插值分析的样子了.也可以说是密度分析.做出来就是一个热力地图的样子. 比如,人口密度,降雨分布等.这都可以由这个例子做出来类似的. 由于上一篇已经介绍过Geoprocessor类和Param ...

  3. GP中Geoprocessor.Execute(string name, IVariantArray parameters, ITrackCancel trackCancel)

    在做一个项目的过程中,发现GP运算方法 Execute(string name, IVariantArray parameters, ITrackCancel trackCancel) 与Execut ...

  4. 关于arcengine中geoprocessor使用的困惑

    最近在实验一个小功能,就是用arcengine10.1做一个小程序,将point类型的shp转换为polyline类型的shp文件,用到的工具是pointstoline,但就是在设置input_fea ...

  5. 利用AE编写切图工具的一些探讨

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.前言 这周利用晚上在家时间研究了下如何使用AE来开发切图工具.最初 ...

  6. ae arcgis engine 关于面转线的方法和注意事项

    代码很简单,如下 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs ...

  7. ae GP制作缓冲区分析

    private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { // ...

  8. arcgis arcengine Using environment settings

    In this topic About using environment settings Environment settings summary table About using enviro ...

  9. ARCGIS常用几种本地数据AE初始化

    1.Personal GDB 新建一个在E盘的名为test的mdb: IWorkspaceFactory workspaceFactory = new AccessWorkspaceFactoryCl ...

随机推荐

  1. jta.properties transactions.properties Log already in use 解决方法

    当在resin里跑多个含有atomikos控制事物的项目时,会报错,Log already in use. 解决方法: 加jta.properties或者transactions.properties ...

  2. Git学习小结(第三次作业)

    本文主要总结一下在学习和使用git中一些用到的命令. 参考教程:廖雪峰git教程 在windows上安装git 下载使用环境:http://msysgit.github.io/, 安装一路默认即可. ...

  3. 安装配置tomcat

    1.安装nginx 下载nginx-1.4.3 解压: tar zxvf nginx-1.4.3.tar.gz 编译安装: ./configure --prefix=/app/act/nginx/ng ...

  4. c编程之排序

    1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 typedef struct Nod ...

  5. python+selenium浏览器调用(chrome、ie、firefox)

    代码: #coding=utf-8 from selenium import webdriver driver=webdriver.Chrome() #调用chrome浏览器 driver.get(' ...

  6. Codeforces Round #353 (Div. 2) D. Tree Construction 二叉搜索树

    题目链接: http://codeforces.com/contest/675/problem/D 题意: 给你一系列点,叫你构造二叉搜索树,并且按输入顺序输出除根节点以外的所有节点的父亲. 题解: ...

  7. bzoj 1800 暴力枚举

    直接暴力枚举四个点,然后判断是否能组成矩形就行了 注意枚举的点的标号从小到大,保证不重复枚举 /**************************************************** ...

  8. [haoi2010]订货 最小费用流

    这道题oj上的标签是动态规划,但我想不出来动态规划怎么搞,空间不爆,时间也要爆的: 好的,不扯淡,此题正常做法是最小费用流: 这道题我写了两遍,为什么呢?原因是第一次写的时候,不会写费用流,又恰好没带 ...

  9. struct {0}初始化

    #include <iostream> struct MyStruct { MyStruct(int a) { a = b = ; } int a; int b; }; int main( ...

  10. 如何将控制台程序包装成windows服务

    1. 新建一个项目,或者从选择当前解决方案--右键-添加--新建项目 2. 选择(项目类型)Visual C#项目,(模板)Windows 服务,填写要创建的服务名称(修改默认的WindowServi ...