Sample code that demonstrates how to create a multilinestring from randomly generated coordinates.

Imports DotSpatial.Geometries
Imports DotSpatial.Topology.Geometries

Private Sub button1_Click(sender As Object, e As EventArgs)
	Dim rnd As New Random()
	Dim Mls As New MultiLineString()
	Dim ls As LineString() = New LineString(39) {}
	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
		ls(ii) = New LineString(coord)
	Next
	Mls = New MultiLineString(ls)

End Sub

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