Пример #1
0
        private void CheckNodedStrings(string wkt, PrecisionModel pm)
        {
            var g       = rdr.Read(wkt);
            var strings = new List <ISegmentString>();

            strings.Add(new NodedSegmentString(g.Coordinates, null));
            new SnapRoundingNoder(pm).ComputeNodes(strings);

            var noded = NodedSegmentString.GetNodedSubstrings(strings);

            foreach (var s in noded)
            {
                Assert.That(s.Count, Is.GreaterThanOrEqualTo(2), "Found a 1-point segmentstring");
                Assert.That(IsCollapsed(s), Is.False, "Found a collapsed edge");
            }
        }
Пример #2
0
 /// <summary>
 /// Returns a <see cref="IList"/> of fully noded <see cref="ISegmentString"/>s.
 /// The <see cref="ISegmentString"/>s have the same context as their parent.
 /// </summary>
 /// <returns>A Collection of NodedSegmentStrings representing the substrings</returns>
 public IList <ISegmentString> GetNodedSubstrings()
 {
     return(NodedSegmentString.GetNodedSubstrings(_snappedResult));
 }
 /// <summary>
 /// Returns a <see cref="IList"/> of fully noded <see cref="ISegmentString"/>s.
 /// The <see cref="ISegmentString"/>s have the same context as their parent.
 /// </summary>
 /// <returns>A Collection of NodedSegmentStrings representing the substrings</returns>
 public IList <ISegmentString> GetNodedSubstrings()
 {
     return(NodedSegmentString.GetNodedSubstrings(_nodedSegStrings));
 }