随笔分类 -  ArcEngine

摘要:开发环境 工具:Visual Studio 2012、ArcEngine10.4.1 语言:C# 开发步骤 1、打开Visual Studio 2012,选择新建项目,创建一个.NET Framework4的,Windows窗体应用程序。取名Demo 2、工具箱中,拖一个splitContainer 阅读全文
posted @ 2019-06-28 18:17 苍龙de链 阅读(652) 评论(0) 推荐(0)
摘要:准备内容 安装环境:win10*64位专业版,ArcGIS_Desktop_1041_151727,C#语言环境,visual studio2012 安装文件:ArcGIS_Engine_1041_151002.iso,ArcObjects_SDK_for_NET_Framework_1041_15 阅读全文
posted @ 2019-06-28 16:43 苍龙de链 阅读(3339) 评论(17) 推荐(2)
摘要:转自百度经验: VS2012中丢失ArcGIS模板的解决方法 由于ArcGIS10.0(for .NET)默认是用VS2010作为开发工具的,所以在先安装VS2012后装ArcGIS10.0 桌面版及ArcObjects SDK for the Microsoft.NET Framework后,在V 阅读全文
posted @ 2014-04-22 16:40 苍龙de链 阅读(599) 评论(0) 推荐(0)
摘要:目的:用ArcEngine9.3开发项目以后,用Visual Studio2008打包工具打包; 同时监测别的机器上是否有ArcEngine Runtime或者Desktop的支持。解决方案:1、在visual studio中打开项目:文件=>添加=>新建项目2、项目类型选择“安装和部署”,模板选择“安装项目”,输入名称和位置3、在应用程序文件夹下新建一个文件夹"mySetup"4、进入“mySetup”,选择添加=>文件 将程序生成后的bin-debug或release下的exe文件、dll文件等加入5、在用户的“程序”菜单下,新建一个文件夹“mySys 阅读全文
posted @ 2014-03-14 16:31 苍龙de链 阅读(1448) 评论(0) 推荐(0)
摘要:private void AddlableTolayer(IFeatureLayer pFeatureLayer, string fieldname//shp中需要标注的字段) { IGeoFeatureLayer pGeoFeatureLayer = pFeatureLayer as IGeoFeatureLayer; pGeoFeatureLayer.DisplayAnnotation = true;//允许标注 IFeatureClass pFeatureClass; pFeatureClass = pGeoFeatureLayer.FeatureClass; //矢量图层标注信息设置. 阅读全文
posted @ 2012-05-25 09:54 苍龙de链 阅读(1618) 评论(0) 推荐(0)
摘要:刷新图层:pMap.PartialRefresh(esriViewGeography, pLayer, null);刷新所有图层:pMap.PartialRefresh(esriViewGeography, null, null);刷新所选择的对象:pMap.PartialRefresh(esriViewGeoSelection, null, null);刷新标注:pMap.PartialRefresh(esriViewGraphics, null, null);刷新图元pLayout.PartialRefresh(esriViewGraphics, pElement, null);刷新所有图 阅读全文
posted @ 2012-05-23 09:10 苍龙de链 阅读(486) 评论(0) 推荐(0)
摘要:此处实现的是导出axMapControl中,所有图像,成JPEG格式。 /// <summary> /// 导出JPEG /// </summary> /// <param name="pActiveView"></param> /// <param name="IResolution"></param> /// <param name="fileName"></param> public void ExportLayerout(IActi 阅读全文
posted @ 2012-05-22 14:18 苍龙de链 阅读(1406) 评论(0) 推荐(0)
摘要:此处treeview模拟TOC控件,实现节点拖动,图层变换功能备注:此处在treeview添加节点,需用"Nodes.Insert(0,A)”,不用"Nodes.Add(A)",因为AE添加图层顺序有关。(A为节点名)AE默认将新加的图层添加在axMapControl控件最上方,而Nodes.Add默认将节点添加在最下方。 /// <summary> /// treeView控件ItemDrag事件 /// </summary> /// <param name="sender"></param> 阅读全文
posted @ 2012-05-22 14:15 苍龙de链 阅读(861) 评论(0) 推荐(0)
摘要:const string strFolder = @"E:\"; //目标文件夹 const string strName = "myshapefile"; //文件名 const string strShapeFieldName = "Shape"; //Open the folder to contain the shapefile as a workspace IFeatureWorkspace pFWS; IWorkspaceFactory pWorkspaceFactory = new ShapefileWorkspaceF 阅读全文
posted @ 2012-04-24 16:49 苍龙de链 阅读(1234) 评论(0) 推荐(0)
摘要:背景:我有n副不同时间段的太平洋地区的bmp图片,想加载到axmapcontrol中,但是不想一幅幅手动配准生成bpw,工作量太大。原理:将需要配准的图片放到axmapcontrol中,得到它的初始范围,接着定下配准范围(定死,太平洋),最后源文件下后配准文件了,重新加载图片即可。代码: private void Adjust_Click(object sender, EventArgs e) { double pX, pY; IRasterDataset2 rasterDataset = new RasterDatasetClass(); object obj = Type.Missing; 阅读全文
posted @ 2012-04-05 16:58 苍龙de链 阅读(854) 评论(2) 推荐(0)
摘要://定义新字段IField pField = new FieldClass(); //字段编辑 IFieldEdit pFieldEdit = pField as IFieldEdit; //新建字段名 pFieldEdit.Name_2 = "A"; //获取图层 IFeatureLayer pFeatureLayer = axMapControl1.Map.get_Layer(0) as IFeatureLayer; IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass; IClass pTable = pFe 阅读全文
posted @ 2012-03-26 16:09 苍龙de链 阅读(733) 评论(0) 推荐(0)
摘要:界面如图所示,button1:打开待切图button2:关闭窗体saveFileDialog1:保存对话框mapcontrol1:地图LicenseControl1:license控件using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using ESRI.ArcGIS.esriSystem;using ESRI.ArcGIS.Con 阅读全文
posted @ 2011-12-30 12:56 苍龙de链 阅读(1394) 评论(0) 推荐(2)