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

using DotSpatial.Geometries;
using DotSpatial.Topology.Geometries;

  public void samplecode()
        {
            Random rnd = new Random();
            MultiLineString Mls = new MultiLineString();
            LineString[] ls = new LineString[40]; 
            for (int ii = 0; ii < 40; ii++)
            {
                Coordinate[] coord = new Coordinate[36];
                for (int i = 0; i < 36; i++)
                {
                    coord[i] = new Coordinate((rnd.NextDouble() * 360) - 180, (rnd.NextDouble() * 180) - 90);
                }
                ls[ii] = new LineString(coord);
            }
            Mls = new MultiLineString(ls);
        }

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