Ejemplo n.º 1
0
        ///<summary>
        /// Copies a coordinate of a <see cref="CoordinateSequence"/> to another <see cref="CoordinateSequence"/>.
        /// The sequences may contain different <see cref="Ordinates"/>; in this case only the common ordinates are copied.
        ///</summary>
        /// <param name="src">The sequence to copy coordinate from</param>
        /// <param name="srcPos">The index of the coordinate to copy</param>
        /// <param name="dest">The sequence to which the coordinate should be copied to</param>
        /// <param name="destPos">The index of the coordinate in <see paramref="dest"/></param>
        protected static void CopyCoord(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos)
        {
            dest.SetX(destPos, src.GetX(srcPos));
            dest.SetY(destPos, src.GetY(srcPos));
            if (src.HasZ && dest.HasZ)
            {
                dest.SetZ(destPos, src.GetZ(srcPos));
            }

            if (src.HasM && dest.HasM)
            {
                dest.SetM(destPos, src.GetM(srcPos));
            }
        }