Index: src/Common/NetTopologySuite/Noding/MCIndexNoder.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/Common/NetTopologySuite/Noding/MCIndexNoder.cs (.../MCIndexNoder.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/Common/NetTopologySuite/Noding/MCIndexNoder.cs (.../MCIndexNoder.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -6,7 +6,6 @@ namespace GisSharpBlog.NetTopologySuite.Noding { - /// /// Nodes a set of s using a index based /// on s and a . @@ -25,29 +24,35 @@ /// /// Initializes a new instance of the class. /// - public MCIndexNoder() { } + public MCIndexNoder() {} /// /// Initializes a new instance of the class. /// /// The to use. - public MCIndexNoder(ISegmentIntersector segInt) - : base(segInt) { } + public MCIndexNoder(ISegmentIntersector segInt) + : base(segInt) {} /// /// /// public IList MonotoneChains { - get { return monoChains; } + get + { + return monoChains; + } } /// /// /// public ISpatialIndex Index { - get { return index; } + get + { + return index; + } } /// @@ -69,9 +74,11 @@ public override void ComputeNodes(IList inputSegStrings) { nodedSegStrings = inputSegStrings; - foreach(var obj in inputSegStrings) - Add((SegmentString)obj); - IntersectChains(); + foreach (var obj in inputSegStrings) + { + Add((SegmentString) obj); + } + IntersectChains(); } /// @@ -80,19 +87,21 @@ private void IntersectChains() { MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector); - foreach(var obj in monoChains) + foreach (var obj in monoChains) { - var queryChain = (MonotoneChain)obj; + var queryChain = (MonotoneChain) obj; var overlapChains = index.Query(queryChain.Envelope); - foreach(var j in overlapChains) + foreach (var j in overlapChains) { - var testChain = (MonotoneChain)j; + var testChain = (MonotoneChain) j; /* * following test makes sure we only compare each pair of chains once * and that we don't compare a chain to itself */ if (testChain.Id <= queryChain.Id) + { continue; + } queryChain.ComputeOverlaps(testChain, overlapAction); nOverlaps++; } @@ -106,9 +115,9 @@ private void Add(SegmentString segStr) { var segChains = MonotoneChainBuilder.GetChains(segStr.Coordinates, segStr); - foreach (var obj in segChains) + foreach (var obj in segChains) { - var mc = (MonotoneChain)obj; + var mc = (MonotoneChain) obj; mc.Id = idCounter++; index.Insert(mc.Envelope, mc); monoChains.Add(mc); @@ -127,7 +136,7 @@ /// /// The public SegmentOverlapAction(ISegmentIntersector si) - { + { this.si = si; } @@ -144,7 +153,6 @@ var ss2 = (SegmentString) mc2.Context; si.ProcessIntersections(ss1, start1, ss2, start2); } - } } -} +} \ No newline at end of file