zoukankan      html  css  js  c++  java
  • 自己做的关于select工具根据属性进行选择

     IFeatureLayer pFeLayer = axMapControl1.get_Layer(0) as IFeatureLayer;
                IDataLayer idata = pFeLayer as IDataLayer;
                IDatasetName idataname = idata.DataSourceName as IDatasetName;
                string path = idataname.WorkspaceName.PathName ;

              
                axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewAll, null, null);
                Geoprocessor gp = new Geoprocessor();
                gp.SetEnvironmentValue("workspace",path);
                gp.OverwriteOutput = true;
                ESRI.ArcGIS.AnalysisTools.Select pSelect = new Select();
                pSelect.in_features = pFeLayer .FeatureClass;
                pSelect.out_feature_class = @"E:\biancheng\3sdnMap\新地图\tiqu.shp";
                pSelect.where_clause = "GRIDCODE>50";
                gp.Execute(pSelect, null);
                IWorkspaceFactory pWspF = new ShapefileWorkspaceFactoryClass();
                IFeatureWorkspace pFW = (IFeatureWorkspace )pWspF.OpenFromFile(path,0);
                IFeatureClass pFeatureClass = pFW.OpenFeatureClass("tiqu");
                IFeatureLayer pFeatureLayer=new FeatureLayerClass () ;
                pFeatureLayer.FeatureClass = pFeatureClass;
                pFeatureLayer.Name = pFeatureClass.AliasName;
                axMapControl1.AddLayer(pFeatureLayer );

  • 相关阅读:
    5个示例带你学习AngularJS
    快速入门:十分钟学会Python
    Memcache知识点梳理
    用Phaser实现Flappy Bird 游戏
    7 个顶级的 HTML5 Canvas 动画赏析
    避坑宝典:如何选择HTML5游戏引擎
    电商平台10大商业与盈利模式
    【英文版本】Android开源项目分类汇总
    Android精品开源整理
    Android开源项目汇总【转】
  • 原文地址:https://www.cnblogs.com/weihongli/p/2167643.html
Copyright © 2011-2022 走看看