资源简介
ArcEngine简单教程——要素的属性查询、空间查询完整demo,包括要素图层的空间查询、属性查询
备份链接:链接:https://pan.baidu.com/s/1h5sRKIczpFErXhw4UPyLww
提取码:lw27
教程博客:https://blog.csdn.net/nominior/article/details/97265885

代码片段和文件信息
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace p3_search
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region 空间查询
private void axMapControl1_OnMapReplaced(object sender ESRI.ArcGIS.Controls.IMapControlEvents2_OnMapReplacedEvent e)
{
for (int i = 0; i < axMapControl1.layerCount; i++)
{
string l_name = axMapControl1.Map.get_layer(i).Name;
cb_layer.Items.Add(l_name);
}
}
private Featurelayer get_FL()
{
Featurelayer pFeaturelayer = null;
for (int i = 0; i < axMapControl1.layerCount; i++)
{
if (cb_layer.Text == axMapControl1.get_layer(i).Name)
{
pFeaturelayer = axMapControl1.get_layer(i) as Featurelayer;
break;
}
}
return pFeaturelayer;
}
private void axMapControl1_onmousedown(object sender ESRI.ArcGIS.Controls.IMapControlEvents2_onmousedownEvent e)
{
Featurelayer pFeaturelayer = get_FL();
if (e.button == 2 && pFeaturelayer != null)
{
IEnvelope box = null;
if (cb_method.Text == “框选查询“)
{
box = axMapControl1.TrackRectangle() as IEnvelope;
ISpatialFilter filter = new SpatialFilterClass();
filter.WhereClause = ““;
filter.Geometry = box;
filter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;
ShowFeatures(pFeaturelayer filter);
}
else
{
IGeometry pGeo;
if (cb_method.Text == “多边形查询“)
{
pGeo = axMapControl1.TrackPolygon();
}
else
{
pGeo = axMapControl1.TrackCircle();
}
ISpatialFilter filter = new SpatialFilterClass();
filter.WhereClause = ““;
filter.Geometry = pGeo;
filter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;
ShowFeatures(pFeaturelayer filter);
}
}
}
public void ShowFeatures(IFeaturelayer featurelayer IQueryFilter condition)
{
if (featurelayer != null)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-08-18 21:39 p3_search\
目录 0 2019-08-18 21:39 p3_search\mxd\
目录 0 2019-08-18 22:23 p3_search\mxd\HuanbaoGeodataba
文件 16728 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 191 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 5437 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 5152 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 920 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 5152 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 191 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 4174 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 5152 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 179 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 5152 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 191 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 223 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 5152 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 12632 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 191 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 4700 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 5152 2015-02-06 16:50 p3_search\mxd\HuanbaoGeodataba
文件 8536 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 1818 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 5152 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 20824 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 9352 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 5152 2015-02-06 16:49 p3_search\mxd\HuanbaoGeodataba
文件 4440 2015-02-06 16:46 p3_search\mxd\HuanbaoGeodataba
文件 191 2014-08-27 11:25 p3_search\mxd\HuanbaoGeodataba
文件 299 2015-02-06 16:46 p3_search\mxd\HuanbaoGeodataba
文件 5152 2015-02-06 16:46 p3_search\mxd\HuanbaoGeodataba
............此处省略100个文件信息
相关资源
- ArcGIS Engine最优路径分析
- arcgis engine实现叠加分析
- arcgis 10.1 中文环境安装包
- 地图符号化(ArcEngine)
- 地图浏览(ArcEngine)
- Arcgis 扩展模块
- shp转cad小工具
- 土地信息管理系统
- 插件式GIS应用框架的设计与实现&mda
- 中国工具——gis插件
- ArcGiS手把手教程三——配准和矢
- arcgis_workstation地址
- ArcGIS_ArcInfo_9.3_Workstation_DVD_BT
- 全国耕地质量大数据平台
- arcpy语法教程入门以及ArcGIS的脚本构建
- ArcGis 编辑过程自动保存插件
- ArcGIS10.3 AfCore.dll重要破解文件
- 广东电子地图.rar
- 基于ArcGIS Engine的三维校园路灯管理系
- 全国省级市级县级矢量地图数据
- 完整的中国矢量地图gis数据
- 中国省市县ArcGIS地图数据(县边界线
- 中国ArcGIS数据
- ArcGIS10服务器未运行的最佳解决办法
- ArcGIS可打开并使用的世界地图
- ArcGIS空间分析基本操作
- 长江经济带shp.zip
- arcgis批量出图
- ArcGIS超级工具1.7.exe
- ArcGIS-温度划分梯度.pdf
评论
共有 条评论