kartoza / stream_feature_extractor

A QGIS plugin to extract stream features (wells, sinks, confluences etc.) from a stream network
GNU General Public License v2.0
6 stars 9 forks source link

We need to be able to identify tops / watersheds #19

Closed timlinux closed 10 years ago

timlinux commented 10 years ago

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:

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.