zoukankan      html  css  js  c++  java
  • 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 ;

  • 相关阅读:
    已知二叉树的前序遍历、中序遍历,求后序遍历
    排序算法
    应用层
    运输层
    mysql分页查询
    mysql 性能分析及explain用法
    数据库SQL优化
    MATLAB GUI设计(1)
    路径选择
    Python itchat库(1)
  • 原文地址:https://www.cnblogs.com/zqctzk/p/9017961.html
Copyright © 2011-2022 走看看