首页 > 其他 > 详细

AE Identify快捷查询接口介绍

时间:2018-05-10 10:14:35      阅读:222      评论:0      收藏:0      [点我收藏+]

(摘抄来自:https://blog.csdn.net/muzai/article/details/5748829)

利用ArcEngine 空间查询,大多数人会马上想到利用IQueryFilter 接口,的确,IQueryFilter 接口是我们经常使用的 查询接口而且使用比较简单,但是在大数据量查询数据,尤其是空间查询时效率会很低,导致速度会很慢。

 

给大家推荐一个接口,给刚刚入门或者还不知道该接口的朋友提供一点参考。

IIdentify 继承了 FeatureLayer 、RasterLayer 、 CadFeatureLayer 等 N 种图层种类,而且查询效率比IQueryFilter要高

缺点:只有与查询图形相交一种查询方式没有IQueryfilter 的查询方式多样

 

 

 

// 获得查询图形

IActiveView act = myMapControl.ActiveView.FocusMap as IActiveView;

IPoint pp = act.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);

//QI FeatureLayer QI   IIdentif

IIdentify pIdentify = needLayer as IIdentify;

IArray pIDs = pIdentify.Identify((IGeometry)pp);

if (pIDs == null || pIDs.Count == 0)

{

      return;

}

// 取 第一个实体

IFeatureIdentifyObj pFeatIdObj = pIDs.get_Element(0) as IFeatureIdentifyObj;

// 1 :获得IFeature 对象

IFeature pFea= pFeatIdObj.Feature;

myMapControl.FlashShape(needFeat.Shape, 3, 300, null);

//2 :获得IRow 对象

IRowIdentifyObject pRowObj = pFeatIdObj as IRowIdentifyObject;

IRow pRow= = pRowObj.Row ;

AE Identify快捷查询接口介绍

原文:https://www.cnblogs.com/zqctzk/p/9017961.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!