• ArcGlobe点击IGlobeServerLayer图层读取信息


    ArcGISServer将点图层发布成Globe服务,AE开发中自定义识别工具,读取点数据信息。
    1) 通过Locate方法获取图层对象,图层对象中的SearchOID就是你点中的要素Objectid。
    2) 通过GlobeServer.Identify读取结果集IGlobeServerIdentifyResults。
     
    代码如下:
     public override void OnMouseDown(int Button, int Shift, int X, int Y)
            {
                if (Button != 1) return;
    
                //Get the element that the user selects
                ESRI.ArcGIS.Geometry.IPoint ppPoint = new ESRI.ArcGIS.Geometry.PointClass();
                ESRI.ArcGIS.Geometry.IZAware zAware = ppPoint as ESRI.ArcGIS.Geometry.IZAware;
                zAware.ZAware = true;
                object ppObject;
                object ppOwner;
                globeDisplay.Locate(globeDisplay.ActiveViewer, X, Y, false, false, out ppPoint, out ppOwner, out ppObject);
    
                if (ppPoint == null) return;
    
                if (!(ppOwner is IGlobeServerLayer)) return;
    
                Help_Globe.FlashPoint(ppPoint);
    
    
                gLayer = ppOwner as IGlobeServerLayer;
                IGlobeLayerInfo gLayeInfo = gLayer.GlobeLayerInfo;
    
    
                if (gLayeInfo.Name != "3dd文件中的点图层名称") return;
    
                IGlobeServerIdentifyResults results = gLayer.GlobeServer.Identify(gLayer.GlobeServerLayerID, gLayer.SearchOID, gLayeInfo.Extent.Envelope);
                if (results.Count > 0)
                {
                    IGlobeServerIdentifyResult result = results.get_Element(0);
                    object dwmc = result.Properties.GetProperty("DW_MC");
    
                    if (Convert.IsDBNull(dwmc) || dwmc == null) return;
    
                    FormWuZhongInfo dlg = new FormWuZhongInfo(dwmc.ToString(), dwmc.ToString());
                    dlg.Text = dwmc.ToString();
                    dlg.ShowDialog();
                    
                }
                return;
    
              
    }
    

      

  • 相关阅读:
    单片机数字滤波的算法!
    Python中列表的兄弟
    史上最全的Python程序员面试必备常用问题
    新人在学习web前端的容易踩哪些坑?
    linux+arm系统学习与基础学习
    C和C++笔记:动态内存管理
    Python 爬虫干货之urllib库
    单片机、ARM、MUC、DSP、FPGA、嵌入式错综复杂的关系!
    单片机死机了怎么办?
    单片机各种复位电路原理
  • 原文地址:https://www.cnblogs.com/janehlp/p/4221645.html
Copyright © 2020-2023  润新知