/// <summary> /// Check all nodes to see if their labels are consistent. /// /// </summary> /// <returns> If any are not, return false</returns> private bool IsNodeEdgeAreaLabelsConsistent() { foreach (DictionaryEntry node in _nodeGraph) { RelateNode relatenode = (RelateNode)node.Value; if (!relatenode.Edges.IsAreaLabelsConsistent()) { _invalidPoint = (Coordinate)relatenode.Coordinate.Clone(); return(false); } } return(true); }
/// <summary> /// Check all nodes to see if their labels are consistent. /// If any are not, return false /// </summary> /// <returns> /// <c>true</c> if the edge area labels are consistent at this node /// </returns> private bool IsNodeEdgeAreaLabelsConsistent() { for (IEnumerator nodeIt = nodeGraph.NodeIterator(); nodeIt.MoveNext();) { RelateNode node = (RelateNode)nodeIt.Current; if (!node.Edges.AreaLabelsConsistent) { invalidPoint = node.Coordinate.Clone(); return(false); } } return(true); }
/// <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>return true if this area Geometry is topologically consistent but has two duplicate rings</returns> public bool HasDuplicateRings() { foreach (DictionaryEntry node in _nodeGraph) { RelateNode relateNode = (RelateNode)node.Value; foreach (object ees in relateNode.Edges) { // awc not sure about all this casting EdgeEndBundle eeb = (EdgeEndBundle)ees; if (eeb.EdgeEnds.Count > 1) { _invalidPoint = eeb.Edge.GetCoordinate(0); return(true); } } } return(false); }
/// <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> /// true if this area Geometry is topologically consistent but has /// two duplicate rings /// </returns> public bool HasDuplicateRings() { for (IEnumerator nodeIt = nodeGraph.NodeIterator(); nodeIt.MoveNext();) { RelateNode node = (RelateNode)nodeIt.Current; for (IEnumerator i = node.Edges.Iterator(); i.MoveNext();) { EdgeEndBundle eeb = (EdgeEndBundle)i.Current; if (eeb.EdgeEnds.Count > 1) { invalidPoint = eeb.Edge.GetCoordinate(0); return(true); } } } return(false); }