Wednesday, September 16, 2015

Feature to Raster Conversion Using C# and ArcGIS

Import ArcGIS.ConversionTools and ArcGIS.Geoprocessor then pass the file paths as param into following function you will get the resulting raster out of shapefile.

 using ESRI.ArcGIS.ConversionTools;  
 using ESRI.ArcGIS.Geoprocessor;  
 public static void Rasterize(string inputFeature, string outRaster, string fieldName, int cellSize)  
         //Runtime manager to find the ESRI product installed in the system  
         Geoprocessor geoprocessor = new Geoprocessor();  
         geoprocessor.OverwriteOutput = true;  
         FeatureToRaster featureToRaster = new FeatureToRaster();  
         featureToRaster.cell_size = cellSize;  
         featureToRaster.in_features = inputFeature;  
         featureToRaster.out_raster = outRaster;  
         featureToRaster.field = fieldName;  
         geoprocessor.Execute(featureToRaster, null);  

ArcGIS , arcobject , C#


Post a Comment


© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me