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()
	'Pass in the file path for the standard shapefile that will be opened
	'An IFeatureSet that contains the factory that will buffer the feature set
	Dim [iF] As IFeatureSet = fs.Buffer(10, True)
	'Saves the buffered feature set as a new file.
	[iF].SaveAs("C:\Temp" & vbCr & "oads_buffer.shp", True)
End Sub

Last edited Jul 13, 2010 at 2:54 PM by AlamoMan, version 4