private void Stuff(MultiLineString multilinestring, IEnumerable <MultiLineString> troutStreamSections, MultiPolygon pal) { IGeometry[] t = multilinestring.Geometries; var stream = t.First(); var primaryLength = stream.Length; var lil = new LocationIndexedLine(stream); var lil2 = new LengthIndexedLine(stream); var result = stream.Intersection(pal) as MultiLineString; var geoms = result.Geometries; foreach (var part in geoms.Select(i => i as LineString)) { var subParts = lil.IndicesOf(part); var count = subParts.Length; foreach (var subPart in subParts) { var fraction = subPart.SegmentFraction; var noIdea = subPart.GetSegmentLength(part); var otherNoIdea = subPart.GetSegmentLength(stream); } var subParts2 = lil2.IndicesOf(part); var count2 = subParts2.Length; foreach (double subPart in subParts2) { // var fraction = subPart. // var noIdea = subPart.GetSegmentLength(part); // var otherNoIdea = subPart.GetSegmentLength(stream); } } }
protected override IGeometry IndicesOfThenExtract(IGeometry input, IGeometry subLine) { var indexedLine = new LocationIndexedLine(input); var loc = indexedLine.IndicesOf(subLine); var result = indexedLine.ExtractLine(loc[0], loc[1]); return(result); }