The goal is to extract river lines which are within the specified distance from the river mouth. Distance has to be measured along the lines.
The workflow consists of 3 parts.
Part 1: The two Snippers creates both end nodes of every river span (Snipping Mode: Vertex), and the Matcher selects end nodes of the network except the river mouth.
This image shows the end nodes and the line segments. These line segments will be used as FROM-TO lines for the ShortestPathFinder in the next part.
Part 3: The ShortestPathFinder finds shortest paths from the river mouth to each end node, the Snipper snips the paths into the specified length if the path length is greater than the specified length, and the PathSplitter and the Matcher are used to remove duplicated lines.
Red lines are the result. The river lines in the downstream have been extracted.
There are various exceptional conditions in the actual data, getting practical solution is not so easy. This is just a skeleton of the workspace.