Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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());
        }