Ring Example - C#
The following shows a C# example that returns a Ring object.
public static Ring buildRing()
{
Ring ring = new Ring();
ring.srsName = "EPSG:4326";
LineString[] lineString = new LineString[1];
lineString[0] = new LineString();
Pos[] coord = new Pos[4];
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;
coord[3] = new Pos();
coord[3].X = -76.55;
coord[3].Y = 45.66;
lineString[0].Pos = coord;
ring.LineString = lineString;
return ring;
}