/// <summary> /// Returns a deep copy of this collection. /// </summary> /// <returns>The copied object.</returns> public object Clone() { CoordinateList copy = new CoordinateList(); foreach (Coordinate c in this) { copy.Add(c.Copy()); } return(copy); }
/// <summary> /// If the coordinate array argument has repeated points, /// constructs a new array containing no repeated points. /// Otherwise, returns the argument. /// </summary> /// <param name="coords"></param> /// <returns></returns> public static IList <Coordinate> RemoveRepeatedPoints(IList <Coordinate> coords) { if (!HasRepeatedPoints(coords)) { return(coords); } CoordinateList coordList = new CoordinateList(coords, false); return(coordList); }