Sample code that demonstrates how to create a Multi Line Feature Set

Imports DotSpatial.Data
Imports DotSpatial.Geometries

Private Sub button1_Click(sender As Object, e As EventArgs)
	Dim rnd As New Random()
	Dim f As New Feature()
	Dim fs As New FeatureSet(f.FeatureType)
	For ii As Integer = 0 To 39
		Dim coord As Coordinate() = New Coordinate(35) {}
		For i As Integer = 0 To 35
			coord(i) = New Coordinate((rnd.NextDouble() * 360) - 180, (rnd.NextDouble() * 180) - 90)
		Next
		Dim ls As New LineString(coord)
		f = New Feature(ls)
		fs.Features.Add(f)
	Next
	fs.SaveAs("C:\Temp\test.shp", True)
End Sub

Last edited Jul 13, 2010 at 3:10 PM by AlamoMan, version 2