I'm using SharpMap's desktop client within a C# WinForms application and GeoServer/PostGis as datasource.
When i add a WFS layer that contains MultiLine it works like charm. But when i add a point layer SharpMap.Utilities.Wfs.ParseCoordinates function parses coordinates with the wrong order, i meant it assigns X coordinate to Y value and Y to X.
ParseCoordinate function is like that:
protected Coordinate[] ParseCoordinates(XmlReader reader)
{
if (!reader.Read()) return null;
string name = reader.LocalName;
string coordinateString = reader.ReadElementString();
var vertices = new List<Coordinate>();
string[] coordinateValues;
int i = 0, length = 0;
if (name.Equals("coordinates"))
coordinateValues = coordinateString.Split(_Cs[0], _Ts[0]);
else
coordinateValues = coordinateString.Split(' ');
length = coordinateValues.Length;
while (i < length  1)
{
double c1 = Convert.ToDouble(coordinateValues[i++], _FormatInfo);
double c2 = Convert.ToDouble(coordinateValues[i++], _FormatInfo);
if (name.Equals("coordinates")  name.Equals("pos"))
vertices.Add(new Coordinate(c1, c2));
else
vertices.Add(new Coordinate(c2, c1));
}
return vertices.ToArray();
}
I've changed order of c1 and c2 values to fix that problem but not sure why it's acting like that.
Here goes the GML output of my geoserver:
<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">51.52672002,25.33049886</gml:coordinates>
X = 51 and y = 25
but reader.ReadElementString(); statement at ParseCoordinates function reads them like that:
25  51
