/// <summary> /// Returns a deep copy of this collection. /// </summary> /// <returns>The copied object.</returns> public object Clone() { CoordinateList copy = new CoordinateList(); foreach (ICoordinate c in this) { copy.Add((ICoordinate)c.Clone()); } 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="coord"></param> /// <returns></returns> public static ICoordinate[] RemoveRepeatedPoints(ICoordinate[] coord) { if (!HasRepeatedPoints(coord)) { return(coord); } CoordinateList coordList = new CoordinateList(coord, false); return(coordList.ToCoordinateArray()); }