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 sinks #13

Closed timlinux closed 10 years ago

timlinux commented 10 years ago

Problem

Given a line layer, identify by selection all sink (points with no downstream nodes)

Proposed solution

The implementation should take the following steps:

IF upstream_node_count > 0 AND downstream_node_count == 0
THEN
    sink = True
ENDIF

The logic here being that if there is more than zero upstream node and there no downstream node, so this node must be the end of the water for this river segment.

Example nodes attribute table (excludes other extracted feature types):

id upstream_node_count downstream_node_count sink
1 3 0 1
2 2 3 0