当前位置: 首页>>代码示例>>C#>>正文


C# Geoprocessor.ResetEnvironments方法代码示例

本文整理汇总了C#中Geoprocessor.ResetEnvironments方法的典型用法代码示例。如果您正苦于以下问题:C# Geoprocessor.ResetEnvironments方法的具体用法?C# Geoprocessor.ResetEnvironments怎么用?C# Geoprocessor.ResetEnvironments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Geoprocessor的用法示例。


在下文中一共展示了Geoprocessor.ResetEnvironments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Geoprocessor

        void IDataManager.TnCreateFeatureLayer(string inFeature, string outLayer, string dieukien,out string out_featureClass)
        {
            //num++;
               Geoprocessor GP = new Geoprocessor();
               //MessageBox.Show(dieukien);
               // Intialize the MakeFeatureLayer tool
               //GP.SetEnvironmentValue("workspace", environment);
               MakeFeatureLayer makefeaturelayer = new MakeFeatureLayer();

               //MessageBox.Show(inFeature);
               makefeaturelayer.in_features = _tempPath.TempFullPath + inFeature; //"C:/tayninh/temp/tempmdb.mdb/tntn_hem_buff_1";
               makefeaturelayer.out_layer = "outlayer";//"C:/tayninh/temp/tempmdb.mdb/ot";//this.Mem4DataManager.TempFullPath+"tn" + outLayer;
               runTool(GP, makefeaturelayer, null);

               SelectLayerByAttribute SelectByAttribute = new SelectLayerByAttribute();
               GP.ResetEnvironments();
               SelectByAttribute.in_layer_or_view = "outlayer";//"C:/tayninh/temp/tempmdb.mdb/ot"; //this.Mem4DataManager.TempFullPath + "tn" + outLayer;
               SelectByAttribute.selection_type = "NEW_SELECTION";
               SelectByAttribute.where_clause = dieukien;
               runTool(GP, SelectByAttribute, null);

               CopyFeatures copyFeatures = new CopyFeatures();

               copyFeatures.in_features = "outlayer";

               copyFeatures.out_feature_class = _tempPath.TempFullPath + "tn" + "cop";// + TnFeatureClassName.HEM_BUFFER_1M_CREATED_FROM_LAYER;

               // Set the output Coordinate System environment
               //GP.SetEnvironmentValue("outputCoordinateSystem",
               //@"C:\Program Files\ArcGIS\Coordinate Systems\Projected Coordinate Systems\UTM\Nad 1983\NAD 1983 UTM Zone 21N.prj");

               //runTool(GP, copyFeatures, null);
               GP.Execute(copyFeatures, null);
               out_featureClass = _tempPath.TempFullPath + "tn" + "cop";// + TnFeatureClassName.HEM_BUFFER_1M_CREATED_FROM_LAYER;
        }
开发者ID:truonghinh,项目名称:TnX,代码行数:35,代码来源:DataManager.cs


注:本文中的Geoprocessor.ResetEnvironments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。