ArcGIS Spatial Query
Creates a spatial query which performs a spatial search for features in the supplied feature class and has the option to also apply an attribute query via a where clause.
///<summary>Creates a spatial query which performs a spatial search for features in the supplied feature class and has the option to also apply an attribute query via a where clause.</summary>
///
///<param name="featureClass">An ESRI.ArcGIS.Geodatabase.IFeatureClass</param>
///<param name="searchGeometry">An ESRI.ArcGIS.Geometry.IGeometry (Only high-level geometries can be used)</param>
///<param name="spatialRelation">An ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum (e.g., esriSpatialRelIntersects)</param>
///<param name="whereClause">A System.String, (e.g., "city_name = 'Redlands'").</param>
///
///<returns>An IFeatureCursor holding the results of the query will be returned.</returns>
///
///<remarks>Call the SpatialQuery method by passing in a reference to the Feature Class, a Geometry used for the search and the spatial operation to be preformed. An exmaple of a spatial opertaion would be intersects (e.g., esriSpatialRelEnum.esriSpatialRelContains). If you would like to return everything found by the spatial operation use "" for the where clause. Optionally a whereclause (e.g. "income > 1000") maybe applied if desired. The SQL syntax used to specify the where clause is the same as that of the underlying database holding the data.</remarks>
public ESRI.ArcGIS.Geodatabase.IFeatureCursor PerformSpatialQuery(ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass, ESRI.ArcGIS.Geometry.IGeometry searchGeometry, ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum spatialRelation, System.String whereClause)
{
// create a spatial query filter
ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass(); // specify the geometry to query with
spatialFilter.Geometry = searchGeometry; // specify what the geometry field is called on the Feature Class that we will be querying against
System.String nameOfShapeField = featureClass.ShapeFieldName;
spatialFilter.GeometryField = nameOfShapeField; // specify the type of spatial operation to use
spatialFilter.SpatialRel = spatialRelation; // create the where statement
spatialFilter.WhereClause = whereClause; // perform the query and use a cursor to hold the results
ESRI.ArcGIS.Geodatabase.IQueryFilter queryFilter = new ESRI.ArcGIS.Geodatabase.QueryFilterClass();
queryFilter = (ESRI.ArcGIS.Geodatabase.IQueryFilter)spatialFilter;
ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureClass.Search(queryFilter, false); return featureCursor;
}
ArcGIS Spatial Query的更多相关文章
- Python MongoDB Spatial Query
//引入Pymongo >>> from pymongo import MongoClient,GEO2D // 链接数据库gis >>> db = MongoCl ...
- ArcGIS中的查询
最近身体不适,静下心来看了一下以前收集的电子书.下面是<ArcGIS地理信息系统教程_第5版>(李玉龙)第5章“查询”的读书笔记. 1.查询的常见应用: 选择感兴趣的要素:查找哪些要素满足 ...
- ArcGIS Engine开发前基础知识(1)
ArcGIS二次开发是当前gis领域的一项重要必不可少的技能.下面介绍它的基本功能 一.ArcGIS Engine功能 在使用之前首先安装和部署arcgis sdk,(在这里不在赘述相关知识)可以实现 ...
- ArcGis学习教程免费版在线观看
ArcGis学习教程免费版在线观看 作者:池建 文章来源:清华大学出版社 点击数:150220 更新时间:2013-8-8 摘要:Arcgis学习视频教程根据书籍章节逐步讲解较为详细 ...
- ArcGIS教程:加权叠加
摘要 使用经常使用測量比例叠加多个栅格数据,并依据各栅格数据的重要性分配权重. 插图 插图中,两个输入栅格已又一次分类为 1 至 3 三种公共測量级别.为每一个栅格均分配了一个影响百分比.这些像元值与 ...
- SQL Server 2008空间数据应用系列九:使用空间工具(Spatial Tools)导入ESRI格式地图数据
转自:http://www.cnblogs.com/beniao/archive/2011/03/22/1989310.html 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Micros ...
- ArcGIS学习推荐基础教程摘录
###########-------------------摘录一--------------------------########### ***************************** ...
- 2013Esri全球用户大会之ArcGIS for Desktop
Q1:ArcGIS 10.2 for Desktop中有哪些新特性? 增强的质量和性能 扩展并行处理能力 许多软件质量的改进 优化的文件处理 ...
- ArcGIS教程:创建特征
摘要 创建由输入样本数据和一组栅格波段定义的类的 ASCII 特征文件. 使用方法 · 输出特征文件应使用扩展名 .gsg. · 输入栅格波段和输入栅格或要素样本数据必须具有重叠范围.将仅为公共区域计 ...
随机推荐
- JavaScript--数据结构算法之链表
数组的缺点:数组的长度固定,增删时比较困难要移动元素,而且数据填满再添加元素比较复杂.js:数组有split(),可以任意的分割.不存在上述问题.主要问题是:js数组都被实现成了对象,和其他语言的数组 ...
- ES6第三节:变量的解构赋值
ES6允许按照一定模式,从数组和对象中提取值,对变量进行赋值,这被称为解构.下面我们看实际的例子: 一.数组解构: let [a,b,c] = [1,2,3]; console.log(a); //a ...
- csdn课堂学习
http://edu.csdn.net/course/detail/2495?ref=blog&loc=0 http://edu.csdn.net/course/detail/2140/336 ...
- poppler交叉编译
项目须要生成和打开pdf文件,编译了pdflib库,能够使用.可是上面有水印. ..假设是商业用途去水印的话须要获得许可. 没办法.换呗. 然后就是poppler,这个库的功能非常强大,里面更是增加了 ...
- 【程序猿笔试面试复习】之中的一个 网络与通信篇(一) 几大网络模型:OSI、TCP/IP、B/S与C/S、MVC结构
9.1网络模型 9.1.1. OSI七层模型 OSI(Open System Interconnection,开放系统互联)七层网络模型称为开放式网络互联參考模型.其为国际标准组织指定的一个指导信息互 ...
- iOS Threading编程指南 官方文档翻译第一篇(序言)
序言 Thread是能够使多个code paths 在同一个APP内并发运行的几种技术之一.虽然新的技术为并发运行提供了先进.高效的工具(例如operation 对象和GCD),但是OS X和iO ...
- Nginx配置GZIP
记录一次解决网站加载慢的问题 一. nginx配置 gzip on;gzip_min_length 1k;gzip_buffers 4 16k;gzip_http_version 1.1;g ...
- 【例题 7-8 UVA - 10603】Fill
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 三维显然可以缩短为2维. 只要知道a,b瓶中的水量,c瓶中的水量减一下就能得到. 则设dis[a][b]表示a,b瓶中水量为a,b时 ...
- 洛谷——P1598 垂直柱状图
https://www.luogu.org/problem/show?pid=1598 题目描述 写一个程序从输入文件中去读取四行大写字母(全都是大写的,每行不超过72个字符),然后用柱状图输出每个字 ...
- 洛谷 P2025 脑力大人之监听电话
P2025 脑力大人之监听电话 题目背景 画外音: (声明:不要管前面那个,纯属意外,现已经重新编题,绝对原创) 上次海选,我们选出了参赛者中的20%参加本次比赛,现在我们将进行第二轮的筛选,这次的比 ...