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 branches #14

Closed timlinux closed 10 years ago

timlinux commented 10 years ago

Problem

Given a line layer, identify by selection all branch (points with more than zero upstream nodes and more than one downstream nodes)

Proposed solution

The implementation should take the following steps:

IF upstream_node_count > 0 AND downstream_node_count > 1
THEN
    branch = True
ENDIF

The logic here being that if there is more than zero upstream node and there are more than one downstream nodes, so this node must be a branch of the river.

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

id upstream_node_count downstream_node_count branch
1 3 0 0
2 2 3 1