We need a tool that will identify all tops / watersheds. That is the collection of upstream nodes from all segments that are not connected to any segment upstream.
It remains to be clarified how we differentiate between wells and watershed, @tilladams perhaps you can shed some light on that?
Proposed solution
Implement a function that provides the following api:
def watershed_nodes(layer):
"""Generate a list of nodes representing the watershed.
:param layer:A vector line layer representing a stream network.
:type layer: QgsVectorLayer
:returns: A memory layer containing all nodes that represent river tops.
:rtype: QgsMapLayer
"""
pass
Add a user interface that allows user to select a line layer. When pressing OK, the UI should extract tops and display them on the map with correct symbology.
Expected outcome
A user should be able to delineate a catchment using this tool.
Problem
We need a tool that will identify all tops / watersheds. That is the collection of upstream nodes from all segments that are not connected to any segment upstream.
It remains to be clarified how we differentiate between wells and watershed, @tilladams perhaps you can shed some light on that?
Proposed solution
Implement a function that provides the following api:
Add a user interface that allows user to select a line layer. When pressing OK, the UI should extract tops and display them on the map with correct symbology.
Expected outcome
A user should be able to delineate a catchment using this tool.