LineString Example - C#

The following shows a C# example that returns a LineString object.


public static LineString buildLineString()
{
    LineString lineString = new LineString();

    lineString.srsName = "EPSG:4326";
    Pos[] coord = new Pos[3];
    coord[0] = new Pos();
    coord[0].X = -76.55;
    coord[0].Y = 45.66;
    coord[1] = new Pos();
    coord[1].X = -75.55;
    coord[1].Y = 46.66;
    coord[2] = new Pos();
    coord[2].X = -77.55;
    coord[2].Y = 47.66;
    lineString.Pos = coord;

    return lineString;
}