コード例 #1
0
        ///// <summary>
        /////
        ///// </summary>
        ///// <param name="oca"></param>
        /*/// <param name="segString"></param>*/
        /// <returns></returns>
        private ISegmentString FindMatching(OrientedCoordinateArray oca /*, ISegmentString segString*/)
        {
            ISegmentString ret;

            if (_ocaMap.TryGetValue(oca, out ret))
            {
                return(ret);
            }
            return(null);
        }
コード例 #2
0
        /// <summary>
        /// Dissolve the given <see cref="ISegmentString" />.
        /// </summary>
        /// <param name="segString"></param>
        public void Dissolve(ISegmentString segString)
        {
            var oca      = new OrientedCoordinateArray(segString.Coordinates);
            var existing = FindMatching(oca /*, segString*/);

            if (existing == null)
            {
                Add(oca, segString);
            }
            else
            {
                if (_merger != null)
                {
                    bool isSameOrientation = CoordinateArrays.Equals(existing.Coordinates, segString.Coordinates);
                    _merger.Merge(existing, segString, isSameOrientation);
                }
            }
        }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="oca"></param>
 /// <param name="segString"></param>
 private void Add(OrientedCoordinateArray oca, ISegmentString segString)
 {
     _ocaMap.Add(oca, segString);
 }