///// <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); }
/// <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); } } }
/// <summary> /// /// </summary> /// <param name="oca"></param> /// <param name="segString"></param> private void Add(OrientedCoordinateArray oca, ISegmentString segString) { _ocaMap.Add(oca, segString); }