BufferingCS - sindizzy/DSW GitHub Wiki

This code demonstrates how to open an existing shapefile as a new feature set using the System.Spatial.Desktop library and then buffer the feature set.

using System.Spatial.Data;

private void button1_Click(object sender, EventArgs e)
   {
      //Declares a new feature set and passes in the file path for the standard 
      //shapefile that will be opened
      IFeatureSet fs = FeatureSet.Open(@"C:\[Your File Path](Your-File-Path)\Municipalities.shp");
      //Buffers the feature set "fs"
      IFeatureSet bs = fs.Buffer(10, true);
      //Saves the buffered feature set as a new file
      bs.SaveAs(@"C:\[Your File Path](Your-File-Path)\Municipalities_Buffer.shp", true);
   }