Advanced Geometric Operation: Extract Downstream River Lines

This is a river system. The data are given as lines representing river spans, and a point of the river mouth. Assume that the lines are edges of a complete network.

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.

Part 2: The CoordinateExtractor extracts (x, y) of the end nodes, the FeatureMerger appends unconditionally every (x, y) to the river mouth (Process Duplicate Suppliers: Yes), and the 2DPointAdder is used to create line segments between the river mouth and every end node.

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.

No comments:

Post a Comment