ArcGIS Engine基础开发教程(5)——学习地图查询

ArcGIS Engine二次开发 目录1 安装环境配置2 参考资料 1 安装环境配置 VS高版本添加工具 打开自己的注册表编辑器:计算机\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\12.0 新建字符串值:ShellFolder和InstallDir如下 2 参考资料 D:\Program Files (x86)\ArcGIS\DeveloperKit10.2\Diagrams 在线参考资料 ... 阅读详情
地图查询
地图查询、统计是一个GIS系统的基本的功能模块,实际上统计功能的前提也是通过查询获取结果以文字或者图表等报表的形式展现查询结果数据。
地图查询有两种类型的查询:
1.空间查询:在地图上设置一定范围,查询这一范围内的要素。例如在地图上画一范围查询这一区域内的所有消防栓,这一范围的所有消防栓高亮显示(或者其他显示方式)并展现出所有的消防栓的属性信息。
2.属性查询:通过一定的查询条件获取目标要素。例如我们需要查询中国行政区上人口大于5000万,同时GDP大于1万亿的省份,通过执行查询,符号条件的省份高亮显示(或者其他显示方式)并展现出这些省份的属性信息。
ArcGIS Engine9.3为开发者提供了无需写代码即可进行查询功能的Identify工具,但是这个工具是一个通用的信息查询新工具。而开发者通常需要自己开发一套符合自己业务需求更加灵活的查询功能模块,甚至一些功能不仅仅是查询信息,很多编辑编辑功能以及和业务相结合的功能开发都用到查询功能。所以很有必要了解ArcGIS Engine的查询机制。
5.1目标
1.熟悉Cursor,FeatureCursor对象,使用IFeatureCursor接口
2.熟悉QueryFilter, SpatialFilter对象使用IQueryFilter,ISpatialFilter接口
3.熟悉要素选择集SelectionSet对象,会使用IFeatureSelection,ISelectionSet接口
4.开发一个属性查询小功能Demo, 获取符号查询条件的Feature,并IFeatureLayerDefinition接口创建一个新的要素图层加载到Mapcontrol上
5.开发一个空间多边形查询功能的小Demo, 学会创建内存半透明图层用于显示选择范围
5.2准备工作
1.IDE:Visual Studio 2005/2008
2.ArcGIS Engine Developer kit 9.3
3.准备一份用于查询的的矢量数据(文章内有说明)
5.3Cursor对象
Cursor(游标)本质上是一个指向数据的指针,本身并不包含数据内容,它是连接到Row对象或要素对象的桥梁。
游标有三种类型,即查询游标、插入游标和更新游标。每一种游标都是通过与之相适应的方法来获得的,如Search、Insert和Update方法。更新和插入游标都需要使用一个过滤器(Filter)对象,因为它们首先必须获得需要进行操作的要素。
Cursor对象支持的接口是ICursor,它定义了操作一个Row集合或一个Row对象的属性和方法,下面是获得插入型、更新型和查询型游标的方法:
pCursor = IFeatureClass.Insert()
使用IFeatureClass的Insert方法返回一个插入型游标,它通常用于往表中插入一条记录。
pCursor = IFeatureClass.Update()
使用IFeatureClass的Update方法会返回一个更新型游标,它用于更新或者删除一条记录。
pCursor= IFeatureClass.Search()
使用IFeatureClass的Sarch方法对表进行查询后,可以得到一个查询型Cursor对象,它指向一个或多个Row对象。
以我们这章的内容主要使用查询游标。
FeatureCursor是Cursor的一个子类,指向一个或多个要素,它实现了IFeatureCursor接口,ArcGIS Engine开发所对矢量图层实现查询功能都是实行IFeatureCursor。
5.4QueryFilter对象与SpatialFilter对象
在关系型数据库中,查询条件是通过SQL语句的Where子语句来完成的。在ArcGIS Engine中不能直接使用SQL语句,但ArcGIS Engine提供了QueryFilter和SpatialFilter两个过滤器对象来配合完成查询条件的设置,从而查询到想要的数据。
QueryFilter过滤器主要用于对属性数据查询条件的设置,它主要实现IQueryFilter接口从而实现属性查询功能。

CODE:


IQueryFilter pQueryFilter = new QueryFilterClass();


//设置过滤器对象的属性
pQueryFilter.WhereClause = "人口> 10000000";

SpatialFilter过滤器主要用于空间范围查询条件的设置,它主要实现ISpatialFilter(继承 IQueryFilter接口)接口从而实现空间查询功能。

CODE:


ISpatialFilter pSpatialFilter = new SpatialFilterClass();


//设置空间过滤器的范围(多边形)
pSpatialFilter.Geometry = pGeometry;


//设置空间过滤器空间关系类型
pSpatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelContains;


空间过滤器空间关系类型主要有以下几种类型如表一所示:

表1


空间过滤器空间关系类型
描述(A是待查询图形,B是过滤条件图形)
esriSpatialRelUndefined
未定义
esriSpatialRelIntersects
A与B图形相交
esriSpatialRelEnvelopeIntersects
A的Envelope和B的Envelope相交
esriSpatialRelIndexIntersects
A与B索引相交
esriSpatialRelTouches
A与B边界相接
esriSpatialRelOverlaps
A与B相叠加
esriSpatialRelCrosses
A与B相交(两条线相交于一点,一条线和一个面相交)
esriSpatialRelWithin
A在B内
esriSpatialRelContains
A包含B
esriSpatialRelRelation
A与B空间关联
5.5SelectionSet要素选择集对象
熟悉ArcGIS Desktop使用的开发者一定会知道当在ArcMap中显示查询结果的时,所有的符号查询调教的要素都以蓝色高亮的形式显示在地图控件上,蓝色高亮显示表示高亮选中,这些高亮显示选中的要素对应一个要素选择集对象中。通过IFeatureSelection的SelectionSet属性可以获取选择集,FeatureLayer对象实现了IFeatureSelection接口。
实现代码如下:

IFeatureLayer pFeatureLayer = this.axMapControl1.get_Layer(0) as IFeatureLayer;


//QI至IFeatureSelection

IFeatureSelection pFeatureSelection = pFeatureLayer as IFeatureSelection;


//
创建过滤器

IQueryFilter pQueryFilter = new QueryFilterClass();


//
设置过滤器对象的查询条件
pQueryFilter.WhereClause =
"
人口> 10000000";


//选择要素
pFeatureSelection.SelectFeatures(pQueryFilter,
esriSelectionResultEnum.esriSelectionResultNew,false);

//
获取选择集对象

ISelectionSet pSelectinSet=pFeatureSelection.SelectionSet;


//设置选择集的符号
pFeatureSelection.SelectionSymbol = pSymbol;


5.6属性查询实例
5.6.1程序实现目标:
查询人口大于5000000的城市,并把查询结果创建为一个新的图层,如图1-3所示:


image001.png

图1


image003.png

图2


image005.png

图3

代码片段如下:

CODE:


private void button1_Click(object sender, EventArgs e)
{
  IFeatureLayer pFeatureLayer = this.axMapControl1.get_Layer(0) as IFeatureLayer;
//QI到FeatureSelection
IFeatureSelection pFeatureSelection = pFeatureLayer as IFeatureSelection;

//创建过滤器
IQueryFilter pQueryFilter = new QueryFilterClass();

//设置过滤器对象的查询条件
pQueryFilter.WhereClause = "人口> 5000000";
//根据查询条件选择要素
pFeatureSelection.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, false);

//QI到ISelectionSet
ISelectionSet pSelectionSet = pFeatureSelection.SelectionSet;

if (pSelectionSet.Count > 0)
{

IFeatureLayerDefinition pFDefinition = pFeatureLayer as IFeatureLayerDefinition;

//创建新图层

IFeatureLayer pNewFeatureLayer = pFDefinition.CreateSelectionLayer("newlayerName", true, null, null);
pNewFeatureLayer.Name = "查询结果城市";
axMapControl1.AddLayer(pNewFeatureLayer as ILayer);
}
}
code]

5.7空间查询实例
5.7.1目标
实现多边形查询功能
5.7.2功能开发
代码片段如下:

引用的命名空间:

[code]
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.ADF;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.DataSourcesGDB;


///<summary>///
在程序运行时的内存中创建矢量要素层,并加到地图控件最顶端
///</summary> ///
<param name="pMapCtrl">地图控件</param>
///<returns>IFeatureLayer 新加的要素层</returns>
private IFeatureLayer AddFeatureLayerByMemoryWS(AxMapControl pMapCtrl,ISpatialReference pSReference)
{
try
{
if (pMapCtrl == null) return null;
#region
创建新的内存工作空间
IWorkspaceFactory pWSF = new InMemoryWorkspaceFactoryClass();
IWorkspaceName pWSName = pWSF.Create("", "Temp", null, 0);

IName pName = (IName)pWSName;
IWorkspace pMemoryWS = (IWorkspace)pName.Open();
#endregion

IField Field = new FieldClass();
IFields Fields = new FieldsClass();
IFieldsEdit FieldsEdit = null;
IFieldEdit FieldEdit = null;
IFeatureClass FeatureClass = null;
IFeatureLayer FeatureLayer = null;
try
{
FieldsEdit = oFields as IFieldsEdit;
oFieldEdit = oField as IFieldEdit;
oFieldEdit.Name_2 = "OBJECTID";
oFieldEdit.Type_2 = esriFieldType.esriFieldTypeOID;
oFieldEdit.IsNullable_2 = false;
oFieldEdit.Required_2 = false;
oFieldsEdit.AddField(oField);

oField = new FieldClass();
oFieldEdit = oField as IFieldEdit;
IGeometryDef pGeoDef = new GeometryDefClass();
IGeometryDefEdit pGeoDefEdit = (IGeometryDefEdit)pGeoDef;
pGeoDefEdit.AvgNumPoints_2 = 5;
pGeoDefEdit.GeometryType_2 = esriGeometryType.esriGeometryPolygon;
pGeoDefEdit.GridCount_2 = 1;
pGeoDefEdit.HasM_2 = false;
pGeoDefEdit.HasZ_2 = false;
pGeoDefEdit.SpatialReference_2 = pSReference;
oFieldEdit.Name_2 = "SHAPE";
oFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry;
oFieldEdit.GeometryDef_2 = pGeoDef;
oFieldEdit.IsNullable_2 = true;
oFieldEdit.Required_2 = true;
oFieldsEdit.AddField(oField);

oField = new FieldClass();
oFieldEdit = oField as IFieldEdit;
oFieldEdit.Name_2 = "Code";
oFieldEdit.Type_2 = esriFieldType.esriFieldTypeSmallInteger;
oFieldEdit.IsNullable_2 = true;
oFieldsEdit.AddField(oField);

//创建要素类
oFeatureClass = (pMemoryWS as IFeatureWorkspace).CreateFeatureClass("Temp", oFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");
oFeatureLayer = new FeatureLayerClass();
oFeatureLayer.Name = "TransTemp";
oFeatureLayer.FeatureClass = oFeatureClass;
//创建唯一值符号化对象
IUniqueValueRenderer pURender = new UniqueValueRendererClass();
pURender.FieldCount = 1;
pURender.set_Field(0, "Code");
pURender.UseDefaultSymbol = false;
ISimpleFillSymbol pFillSym = new SimpleFillSymbolClass();
pFillSym.Style. = esriSimpleFillStyle.esriSFSSolid;
//半透明颜色
IRgbColor pColor = new RgbColorClass();
pColor.Red = 255;
pColor.Green = 255;
pFillSym.Color = pColor;
pURender.AddValue("1", "", pFillSym as ISymbol);
pFillSym = new SimpleFillSymbolClass();
pFillSym.Style. = esriSimpleFillStyle.esriSFSSolid;
//唯一值符号化内存图层
(oFeatureLayer as IGeoFeatureLayer).Renderer = pURender as IFeatureRenderer;
ILayerEffects pLyrEffect = oFeatureLayer as ILayerEffects;
//透明度
pLyrEffect.Transparency = 80;
}
catch(Exception Err)
{
MessageBox.Show(Err.Message);
}


finally
{
try{
ystem.Runtime.InteropServices.Marshal.ReleaseComObject(oField);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oFields);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oFieldsEdit);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oFieldEdit);
System.Runtime.InteropServices.Marshal.ReleaseComObject(pName);
System.Runtime.InteropServices.Marshal.ReleaseComObject(pWSF);
System.Runtime.InteropServices.Marshal.ReleaseComObject(pWSName);
System.Runtime.InteropServices.Marshal.ReleaseComObject(pMemoryWS);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oFeatureClass);
}
catch
{



}
GC.Collect();
}
return oFeatureLayer;
}
catch (Exception Err)
{
MessageBox.Show(Err.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return null;}



}


CODE:


/// <summary> 在地图控件上添加透明临时图元/// </summary>
/// <param name="pMapCtrl">地图控件</param>
/// <param name="pGeo">Envelope或Polygon几何实体</param>
/// <param name="bAutoClear">是否清除原有内容</param>
public void AddTransTempEle(AxMapControl pMapCtrl, IGeometry pGeo, bool bAutoClear)
{
try
{
if (pMapCtrl == null) return;
if (pGeo == null) return;
if (pGeo.IsEmpty) return;
IGeometry pPolygon = null;
if (pGeo is IEnvelope)
{
object Miss = Type.Missing;
pPolygon = new PolygonClass();
IGeometryCollection pGeoColl = pPolygon as IGeometryCollection;
pGeoColl.AddGeometry(pGeo, ref Miss, ref Miss);
}
else if (pGeo is IPolygon)
{
(pGeo as ITopologicalOperator).Simplify();
pPolygon = pGeo;
}
else
{
MessageBox.Show( "几何实体类型不匹配","提示" ,MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
//获取透明要素层
IFeatureLayer pFlyr = null;
for (int i = 0; i < pMapCtrl.LayerCount; i++)
{
if (pMapCtrl.get_Layer(i).Name == "TransTemp")
{
pFlyr = pMapCtrl.get_Layer(i) as IFeatureLayer;
break;
}
}
//透明临时层不存在需要创建
if (pFlyr == null)
{
pFlyr = AddFeatureLayerByMemoryWS(pMapCtrl,pMapCtrl.SpatialReference);
if (pFlyr == null)
{
MessageBox.Show("创建透明临时图层发生异常", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
IFeatureClass pFC = pFlyr.FeatureClass;
if (bAutoClear)
{
if (pFC.FeatureCount(null) > 0)
{
IFeatureCursor pFCursor = pFC.Search(null, false);
if (pFCursor != null)
{

IFeature pFeature = pFCursor.NextFeature();
if (pFeature != null)
{
while (pFeature != null)
{
pFeature.Delete();
pFeature = pFCursor.NextFeature();
}
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(pFCursor);
}
}
}
//创建要素
IFeature pNFeature = pFC.CreateFeature();
pNFeature.Shape = pPolygon;
pNFeature.set_Value(pFC.FindField("Code"),"1");
pNFeature.Store();
pMapCtrl.Refresh(esriViewDrawPhase.esriViewGeography, pFlyr, pFlyr.AreaOfInterest);
}
catch (Exception Err)
{
MessageBox.Show(Err.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}

CODE:


/// <summary>
/// 获取查询要素
/// </summary>
/// <param name="pFeatureLayer">要素图层</param>
/// <param name="pGeometry">图形范围参数</param>
/// <returns>符号条件要素集合</returns>
private List<IFeature> GetSeartchFeatures( IFeatureLayer pFeatureLayer,IGeometry pGeometry)
{
try
{
List<IFeature> pList = new List<IFeature>();
//创建SpatialFilter空间过滤器对象
ISpatialFilter pSpatialFilter = new SpatialFilterClass();
IQueryFilter pQueryFilter = pSpatialFilter as ISpatialFilter;
//设置过滤器的Geometry
pSpatialFilter.Geometry = pGeometry;
//设置空间关系类型
pSpatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelContains;
//获取FeatureCursor游标
IFeatureCursor pFeatureCursor = pFeatureLayer.Search(pQueryFilter, false);
//遍历FeatureCursor
IFeature pFeature = pFeatureCursor.NextFeature();
while (pFeature != null)
{
//获取要素对象
pList.Add(pFeature);
pFeature = pFeatureCursor.NextFeature();
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(pFeatureCursor);
return pList;
}
catch (Exception Err)
{
MessageBox.Show(Err.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return null;
}
}

CODE:


bool bSearch = false; //定义bool变量用于启动多边形查询功能
private void button1_Click(object sender, EventArgs e)
{
try
{
        //向地图控件添加内存图层
IFeatureLayer pFeatureLayer = this.AddFeatureLayerByMemoryWS(this.axMapControl1,this.axMapControl1.SpatialReference);
this.axMapControl1.AddLayer(pFeatureLayer);
  //设置鼠标样式为十字丝
this.axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
        //启动范围查询功能
bSearch = true;
}
添加一个新的Form在Form上添加一个DataGridView控件用于显示查询结果信息。如图4所示:


image007.png

CODE:

private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
{
if (bSearch)
{
//设置鼠标样式为十字丝
this.axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
//获取画定范围的Geometry
IGeometry pGeometry = this.axMapControl1.TrackPolygon();
//添加半透名临时图形
this.AddTransTempEle(this.axMapControl1, pGeometry, false);
IFeatureLayer pFeatureLayer=this.axMapControl1.get_Layer(1) as IFeatureLayer;
//执行查询获取符号条件的要素
List<IFeature> pFList = this.GetSeartchFeatures(pFeatureLayer, pGeometry);

attribute pAttribute = new attribute();
//设置信息显示窗体中DataGridView的属性
//设置行数pFList.Count+1包括字段名哪一行即表头
pAttribute.dataGridView1.RowCount = pFList.Count+1;
//设置边界风格
pAttribute.dataGridView1.ColumnHeadersBorderStyle. = DataGridViewHeaderBorderStyle.Sunken;
//设置列数
pAttribute.dataGridView1.ColumnCount = pFList[0].Fields.FieldCount;
//遍历第一个要素的字段用于给列头赋值(字段的名称)
for(int m=0;m<pFList[0].Fields.FieldCount;m++)
{
pAttribute.dataGridView1.Columns[m].HeaderText = pFList[0].Fields.get_Field(m).AliasName;
}
//遍历要素
for (int i = 0; i < pFList.Count; i++)
{
IFeature pFeature=pFList;
for(int j=0;j<pFeature.Fields.FieldCount;j++)
{
//填充字段值
pAttribute.dataGridView1[j, i].Value = pFeature.get_Value(j).ToString();
}
}
pAttribute.Show();

}
}

5.7.3功能演示

1.单击按钮向地图控件上添加一内存图层,并启动多边形查询功能如图5示:



image009.png

图5

2.点击鼠标左键在地图上画以多边形范围,双击结束,将看到在所画的范围以半透明的形式添加在地图之上,并显示出查询结果的属性信息如图所示:


image011.png

图6
5.7.4 Demo总结:
1.使用IWorkspaceFactory,IWorkspaceName,IName,IWorkspace等接口以及InMemoryWorkspaceFactoryClass对象创建在程序运行时的内存中的矢量要素层
2.复习IUniqueValueRenderer等接口以及UniqueValueRendererClass对象唯一值符号化要素图层
3.使用ILayerEffects接口创建半透明效果要素图层
4.使用ISpatialFilter,IQueryFilter 等接口以及SpatialFilterClass对象获取符号条件的FeatureCursor,并学会通过遍历整个FeatureCursor中Feature对象,获取符号查询条件的Feature集合
5.使用IFeatureLayerDefinition根据要素选择集创建新要素图层


5.8附IFeatureClass.Search(IQuery Filter,bool Recycling)参数说明
FeatureClass的Search方法大家经常用到,很多人对Search方法的其中一个参数bool Recycling不是很理解。先做以下解释:

1.pFeatureCursor存储的是所有符合条件的Feature对象的引用,
2.Recycling的意思是回收,参数Recycling为True的时当执行这个方法IFeature pFeature=pFeatureCursor.NextFeature()上一条记录的图形值在内存中所占的地址就会被销毁回收,为False的时候当执行这个方法IFeature pFeature=pFeatureCursor.NextFeature()上一条记录的图形值依然存在在内存中。
1.参数Recycling设置为True

IFeatureClass pFeatureClass = (this.axMapControl1.get_Layer(0) as IFeatureLayer).FeatureClass;
IFeatureCursor pFeatureCursor = pFeatureClass.Search(null, true);
//IFeatureCursor pFeatureCursor = pFeatureClass.Search(null, false);
List<IFeature> pFeatures = new List<IFeature>();
IFeature pFeature = pFeatureCursor.NextFeature();
while (pFeature != null)
{
pFeatures.Add(pFeature);
pFeature = pFeatureCursor.NextFeature();
}
for (int i = 0; i < pFeatures.Count; i++)
{
MessageBox.Show(((pFeatures.Shape as IPolygon) as IArea).Area.ToString());
}

分析:pFeatures集合存储了指向FeatureClass上所有Feature的引用,但是由于Recycling参数设置为TRUE也就是说每执行一个NextFeautre方法上一条记录的Feature值在内存中被回收,所以到最后遍历pFeatures集合的时候所有的IFeature引用指向的Feature对象都为Null。所以会引发一下错误(如下图7所示):



image014.jpg

图7
.参数Recycling设置为False
IFeatureClass pFeatureClass = (this.axMapControl1.get_Layer(0) as IFeatureLayer).FeatureClass;
//IFeatureCursor pFeatureCursor = pFeatureClass.Search(null, true);
IFeatureCursor pFeatureCursor = pFeatureClass.Search(null, false);
List<IFeature> pFeatures = new List<IFeature>();
IFeature pFeature = pFeatureCursor.NextFeature();
while (pFeature != null)
{
pFeatures.Add(pFeature);
pFeature = pFeatureCursor.NextFeature();
}
for (int i = 0; i < pFeatures.Count; i++)
{
MessageBox.Show(((pFeatures.Shape as IPolygon) as IArea).Area.ToString());
}

分析:pFeatures集合存储了指向FeatureClass上所有Feature的引用,但是由于Recycling参数设置为False也就是说每执行一个NextFeautre方法上一条记录的Feature值在内存中依然存在,所以到最后遍历pFeatures集合的时候所有的IFeature引用指向的Feature对象都依然存在。所以会执行的很Happy(如下图8所示):


image016.jpg

图8

Link: http://www.gisall.com/html/59/4359-899.html

 

ArcGIS二次开发——地图居中显示 ArcGIS二次开发——地图居中显示 一、创建 Engine 应用程序 1.启动 Visual Studio 2012,从“文件”->“新建”选中“项目”,在弹出的新建项目对话框中,首先选中Visual C#,然后在模板中选中 Windows 应用窗体程序,为该程序命名为“地图查询”,然后通过点击“浏览”按钮,指定一个存放工程文件的路径,点击“确定”。 2.创建 MapViewer 工程后... 阅读详情

相关推荐

ArcGIS Engine开发教程--从零搭建GIS桌面应用

是Esri提供的GIS组件库,支持开发者使用C#、VB.NET、Java等语言构建自定义的桌面GIS应用程序。与ArcGIS Desktop不同,Engine无需依赖完整ArcMap环境,适合轻量化、定制化GIS系统开发。

weixin_41234946的博客 1759

ArcGIS Engine基础开发教程之地图查询

地图查询、统计是一个GIS系统的基本的功能模块,实际上统计功能的前提也是通过查询获取结果以文字或者图表等报表的形式展现查询结果数据。地图查询有两种类型的查询: 1.空间查询:在地图上设置一定范围,查询这一范围内的要素。例如在地图上画一范围查询这一区域内的所有消防栓,这一范围的所有消防栓高亮显示(或者其他显示方式)并展现出所有的消防栓的属性信息。 2.属性查询:通过一定的查询条件获取...

514

ArcGIS Engine学习总结

AE开发

linaYYY的博客 1997

GIS空间查询(SpatialFilter)时各种空间关系总结

在使用ISpatialFilter接口进行空间关系查询时,使用esriSpatialRelEnum枚举类型来判断空间关系。 1、esriSpatialRelContains(包含)和esriSpatialRelWithin(包含于) 应用范围: 所有要素类之间均具有该关系 描述:可细分为一个要素完全包含另一个要素和一个要素被另一个要素完全包含。它们是相对的关系,若果说...

漓涂 1万+

牟乃夏《ArcGIS Engine地理信息系统开发教程》学习笔记1-前言

通过此案例,可以快速掌握ArcGIS Engine开发的基本流程(控件使用、数据加载、事件交互),为后续复杂功能开发奠定基础。假设我们需要为某环保部门开发一个简易GIS工具,用于快速查看区域污染源分布地图,并支持点击查询污染源属性信息。的GIS开发工具包,支持C#、Java、VB.NET等多种编程语言。以上为博主自己在学习过程中的学习笔记,用于学习和交流,欢迎大家批评纠正。:Shapefile格式的污染源点数据(包含名称、类型、浓度等字段):如绘制缓冲区、空间查询(统计某区域内的污染源数量)。

weixin_41234946的博客 1178

ArcGIS Desktop、ArcGIS Engine与ArcGIS Server区别

Dsktop用来处理图像,Engine用于开发组件,Server用于发布服务。 Desktop是一个数据分析处理为主的软件,可以对图做各种分析。 Engine是一个开发的软件,esri的arcgis产品都是用AO开发的,但是AO过于庞大、复杂,而且很多东西一般都用不到,所以他们把常用的删减下来,弄成了一个独立的产品,那就是arcengine。 Server是一个发布服务的工具或说平台,可以将很...

愤怒的小兵 6003

C盘瘦身清理android avd/installer/DriverStore

清理C盘windows下的installer,清理C盘windows下的DriverStore,迁移android stdio 的模拟器avd的存放路径

runnerxin的博客 5764

ArcGIS Engine学习(1)

ArcGIS Engine简介

晓鹤翔 2150

ArcGIS空间关系:ArcEngine中的esriSpatialRelEnum枚举

本文从ArcGIS空间查询接口,本文偏应用,主要介绍ArcEngine枚举esriSpatialRelEnum,从ISpatialFilter的SpatialRel属性来介绍 esriSpatialRelEnum枚举 序号 项 英文描述 中文描述 1 esriSpatialRelUndefined No Defined Spatial Relationship. 没有定义的空间关系 2 esriSpatialRelIntersects Query Geometry Intersects

XiaoCai 3906

ArcGIS Engine开发知识点整理(一)

基础定义和类库的汇总,可作为类库字典观看。 ArcGIS Objects是构建软件产品的组件库:ArcGIS Desktop、ArcGIS Server等软件。 AO是开发平台。将其大部分功能封装形成独立的软件包:ArcGIS Engine ArcGIS engine其实一种开发工具包:工具包意思是一系列接口的集合。 List itemArcGIS Engine包含四方面:基本服务,数据存取,地...

d65271235的博客 2420

掌握ArcGIS Engine 开发技能:标准培训教程3

本文还有配套的精品资源,点击获取 简介:《ArcGIS Engine标准培训教程3》是Esri公司提供的专业教程,旨在帮助开发者掌握ArcGIS Engine技术,构建高效且功能丰富的GIS应用程序。教程深入讲解了ArcGIS Engine的核心概念、功能以及开发流程,并覆盖了从地图控件、工具条控件到图层管理、空间查询与分析等关键组件。教程还包括了开发环境设置、基础地图操作...

weixin_42400643的博客 1739

IFeatureCursorProxy.flush AutomationException: 0x80041538

添加面的时候碰到的一个问题,有些数据没问题,有些报错,后来请教一位同事说有可能是经纬度字段的数据精度问题,因为投影坐标系统不同,支持的经纬度经度不同,后来转换投影坐标系统后果然解决问题了,我一开始也怀疑是数据引起的,但怎么检查没都发现具体的数据问题,真心佩服同事啊! 具体错误如下: AutomationException:0x80041538- atcom.esri.arcgis.i...

weixin_30951231的博客 281

ArcGIS Engine开发实例详解与实战教程

本章系统地介绍了 ArcGIS Engine 中几何对象的创建与空间分析功能的实现方法,包括点、线、面的构造方式,空间关系判断、缓冲区分析、叠加分析等基础与高级空间分析功能。通过实际案例的讲解,帮助开发者掌握如何在项目中整合这些功能,为后续的空间决策支持系统开发打下坚实基础。ArcGIS Engine 支持开发者创建自定义地图工具(Custom Tool),用于实现特定的地图交互功能,如测量、绘制图形、选择要素等。创建类并实现ITool接口。实现接口方法,如OnClick()

weixin_31419153的博客 1049

Arcgis Engine 二次开发之属性查询

一、类库接口描述 1、IQueryFilter接口 过滤数据通过属性值或者属性之间的关系,一般为其赋WhereClause和SubFields属性。 2、IFeatureClass接口 (1)Search方法 IFeatureCursor返回值 返回查询结果集IFeatureCursor接口的游标,目的是遍历查询结果,在地图中不会显示查询结果 (2)Select方法 ISelectionSet返回值 返回结果为ISelectionSet接口的选择集,在地图中不会显示查询结果。 3、IFeat

大神进阶之路 7976

别再只用CANape测数据了!手把手教你用ASAP2 Studio编辑A2L文件(附MAP文件更新避坑指南)

本文深入探讨ASAP2 Studio在ECU开发中的高阶应用,特别是如何利用其编辑A2L文件并同步更新MAP文件,提升测量标定效率。文章详细解析了ASAP2 Studio的双向同步能力、MAP文件更新全流程及变量管理技巧,帮助工程师避免常见错误,优化工作流程。

weixin_26833939的博客 508

SAP期初库存导入 (1)

LSMW

IT养家 7192

ArcGIS Engine10.0轻松入门级教程(1)——必备基础知识

六月的某一天,骄阳似火,夜幕已悄悄降临,坐在电脑前回想自己的大学四年时光,或痛心疾首,或微微憨笑,感概万千,在GIS专业学习了4年,有很多收获,也有很多遗憾,幸而考上了研究生可以继续深造。于是乎心里的雄心一下被激发了,总结自己的所学知识,打算重新开始,把ArcGIS Engine写一本入门级的教程,为初学者少做弯路,也为自己总结下知识,更为打发着无聊时光。以上为序,语无伦次自娱自乐!PS:本教程虽

lianliancf的专栏 1万+

大麦APP抢票协议分析:从‘掌密网络’代码看移动端API安全防护

本文深度解析了大麦APP抢票协议的安全防护体系,重点分析了'掌密网络'代码中体现的动态签名、设备指纹和人机验证等关键技术。文章详细介绍了大麦APP如何通过多层次API安全防护应对抢票压力,包括参数加密、请求头部设计和异常处理机制,为移动应用开发者提供了安全实践建议。

weixin_28740299的博客 292
上一篇: 创建和发布Web Service
下一篇: C#:日期和时间的正则表达式
berkshirman
博客等级 码龄19年 41粉丝 41原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值