BufferingVB - 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.

Imports System.Windows.Forms
Imports DotSpatial.Data

Private Sub button1_Click(sender As Object, e As EventArgs)
	'Declare a new feature set
	Dim fs As New FeatureSet()
	fs.FillAttributes()
	'Pass in the file path for the standard shapefile that will be opened
	fs.Open("C:\Temp\roads.shp")
	'An IFeatureSet that contains the factory that will buffer the feature set
	Dim [iF](iF) As IFeatureSet = fs.Buffer(10, True)
	'Saves the buffered feature set as a new file.
	[iF](iF).SaveAs("C:\Temp" & vbCr & "oads_buffer.shp", True)
End Sub