• AE Identify快捷查询接口介绍


    (摘抄来自: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 ;

  • 相关阅读:
    nth-child与nth-of-type
    改变事件绑定的this的问题
    瀑布流的一些CSS实现方式
    事件捕获与冒泡的再探
    为学
    ECharts导出word 图表模糊失真
    垂直对齐:vertical-align:super属性
    Vuex- Action的 { commit } {commit}是什么写法
    修改对象中的属性名
    echarts 角度渐变环形图心得
  • 原文地址:https://www.cnblogs.com/zqctzk/p/9017961.html
Copyright © 2020-2023  润新知