//MULTIPOINT((0 0),(1 2)) public static string ToWkt(PointBag2 <double> geom) { if (geom != null) { StringBuilder sb = new StringBuilder(); sb.Append("MULTIPOINT("); for (uint i = 0; i < geom.VertexCount; i++) { sb.Append('('); sb.Append(geom[i].X); sb.Append(' '); sb.Append(geom[i].Y); sb.Append("),"); } if (geom.VertexCount > 0) { sb[sb.Length - 1] = ')'; //replace last paren } else { sb.Append(')'); //empty case } return(sb.ToString()); } return(string.Empty); }
public PointBag2(PointBag2 <T> other) { if (other == null) { throw new ArgumentNullException(); } this.Points = other.Points; }
public static JObject ToGeoJson(PointBag2 <double> geom) { if (geom == null) { return((JObject)null); } JObject jobject = new JObject(); jobject.Add("type", (JToken) new JValue("MultiPoint")); JArray jarray = new JArray(); foreach (Point2 <double> point in geom) { jarray.Add((JToken) new JArray() { (JToken) new JValue(point.X), (JToken) new JValue(point.Y) }); } jobject.Add("coordinates", (JToken)jarray); return(jobject); }
public int CompareTo(PointBag2 <T> other) { throw new NotImplementedException(); }
public bool Equals(PointBag2 <T> other) { throw new NotImplementedException(); }