本文整理汇总了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;
}