} // public override string ToString() public override bool Equals(object obj) { bool returnValue = false; EdgeEndBundle eeb = obj as EdgeEndBundle; if (eeb != null) { if (_edgeEnds.Count != eeb.EdgeEnds.Count) { return(false); } for (int i = 0; i < _edgeEnds.Count; i++) { if (!((EdgeEnd)_edgeEnds[i]).Equals(eeb.EdgeEnds[i])) { return(false); } } // now need to check base class if (!base.Equals(obj)) { return(false); } returnValue = true; } return(returnValue); } // public override bool Equals( object obj )
} // public override void Insert( EdgeEnd e ) /// <summary> /// Update the IM with the contribution for the EdgeStubs around the node. /// </summary> /// <param name="im"></param> public void UpdateIM(IntersectionMatrix im) { ArrayList edges = Edges(); foreach (object obj in edges) { EdgeEndBundle esb = (EdgeEndBundle)obj; esb.UpdateIM(im); } } // void UpdateIM( IntersectionMatrix im )
/// <summary> /// Insert an EdgeEnd in order in the list. If there is an existing EdgeStubBundle which is parallel, /// the EdgeEnd is added to the bundle. Otherwise, a new EdgeEndBundle is created to contain the EdgeEnd. /// </summary> /// <param name="e"></param> public override void Insert( EdgeEnd e ) { EdgeEndBundle eb = (EdgeEndBundle) _edgeMap[ e ]; if (eb == null) { eb = new EdgeEndBundle( e ); InsertEdgeEnd( e, eb ); } else { eb.Insert( e ); } } // public override void Insert( EdgeEnd e )
/// <summary> /// Insert an EdgeEnd in order in the list. If there is an existing EdgeStubBundle which is parallel, /// the EdgeEnd is added to the bundle. Otherwise, a new EdgeEndBundle is created to contain the EdgeEnd. /// </summary> /// <param name="e"></param> public override void Insert(EdgeEnd e) { EdgeEndBundle eb = (EdgeEndBundle)_edgeMap[e]; if (eb == null) { eb = new EdgeEndBundle(e); InsertEdgeEnd(e, eb); } else { eb.Insert(e); } } // public override void Insert( EdgeEnd e )
} // public bool IsNodeConsistentArea() /// <summary> /// Checks for two duplicate rings in an area. /// Duplicate rings are rings that are topologically equal /// (that is, which have the same sequence of points up to point order). /// If the area is topologically consistent (determined by calling the IsNodeConsistentArea, /// duplicate rings can be found by checking for EdgeBundles which contain /// more than one EdgeEnd. /// (This is because topologically consistent areas cannot have two rings sharing /// the same line segment, unless the rings are equal). /// The start point of one of the equal rings will be placed in /// invalidPoint. /// </summary> /// <returns>Returns true if this area Geometry is topologically consistent but has two /// duplicate rings.</returns> public bool HasDuplicateRings() { foreach (DictionaryEntry entry in _nodes) { RelateNode node = (RelateNode)entry.Value; foreach (object objEdgeEnd in node.Edges) { EdgeEndBundle eeb = (EdgeEndBundle)objEdgeEnd; if (eeb.EdgeEnds.Count > 1) { _invalidPoint = eeb.Edge.GetCoordinate(); return(true); } } } // foreach ( object obj in _nodes ) return(false); } // public bool HasDuplicateRings()