コード例 #1
0
 private bool Combine(string layerNames)
 {
     try
     {
         ESRI.ArcGIS.Geoprocessor.Geoprocessor   gp      = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
         ESRI.ArcGIS.SpatialAnalystTools.Combine combine = new ESRI.ArcGIS.SpatialAnalystTools.Combine();
         combine.in_rasters = layerNames;
         combine.out_raster = AppSingleton.Instance().WorkspacePath + "\\" + "Ekolojik_Sit_Alani";
         gp.AddOutputsToMap = true;
         gp.OverwriteOutput = true;
         gp.Execute(combine, null);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
コード例 #2
0
 private string Combine(string layerNames, string outLayerName)
 {
     try
     {
         ESRI.ArcGIS.Geoprocessor.Geoprocessor   gp      = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
         ESRI.ArcGIS.SpatialAnalystTools.Combine combine = new ESRI.ArcGIS.SpatialAnalystTools.Combine();
         combine.in_rasters = layerNames;
         combine.out_raster = AppSingleton.Instance().WorkspacePath + "\\" + outLayerName;
         gp.AddOutputsToMap = true;
         gp.OverwriteOutput = true;
         gp.Execute(combine, null);
         return(combine.out_raster.ToString());
     }
     catch (Exception ex)
     {
         return(string.Empty);
     }
 }