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 pseudo-nodes #16

Closed timlinux closed 10 years ago

timlinux commented 10 years ago

Problem

Given a line layer, identify by selection all pseudo-nodes (points one upstream node and one downstream node)

Proposed solution

The implementation should take the following steps:

IF upstream_node_count == 1 AND downstream_node_count == 0
THEN
    pseudo-node = True
ENDIF

The logic here being that if there is one upstream node and there is one downstream nodes, so this node must be a pseudo-node (a node that can be omitted)

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

id upstream_node_count downstream_node_count has_pseudo-nodes
1 1 1 1
2 2 3 0