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 );

  • 相关阅读:
    java中Excel导出
    springmvc接收各种参数
    restTemplate使用
    java中io流的操作
    在线Cron表达式生成器
    springBoot实现socketio
    maven的使用
    idea中导入githup项目
    java 单例模式之线程安全的饿汉模式和懒汉模式
    spring定时任务的集中实现
  • 原文地址:https://www.cnblogs.com/weihongli/p/2167643.html
Copyright © 2011-2022 走看看