7

I am working on QGIS. I have a river network where each segment is a line with ID from the upstream one (if any) and the downstream one (if any). I also have information on:

  • location of dams
  • location of fisheries communities

I want to assess the impact of dams on quantities fished by each community.

Is it possible to count the number of upstream dams along the river for each community in QGIS?

Here is an example where dams are represented in red and fisheries communities in green. I would like, for each community, to know how many dams are located upstream along the river. For example, there is 0 upstream dam for communities A. For point C, there is one dam, but no dam for point B since it is located along a tributary of the main river and there is no dam along this tributary.The same applies for point E. Finally, for points D, there are 2 upstream dams.

Example

2 Answers 2

1

enter image description here

  1. Shortest line between features, Community point layer as source, river as destination. This will create a line between each point and nearest river.
  2. Geometry by expression end_point($geometry) to create a point where the shortest line connect to the river.
  3. Service area (from layer). River as network layer, end points as start points. For travel cost set a maximum distance to search for dams upriver. Under Advanced parameter set Default direction to backward, to only go upriver.
  4. Join attributes by location (summary). Join to features in Service area (lines), by comparing to Dam layer. Leave fields to summarize empty, summaries to calculate count. This will count how many dams is found upstream each service area.

Output is a table with the attributes from your communities layer and a count of dams (id_count column) upriver: enter image description here

So for example community B have 0 dams upriver, D2 have 2

0

Although not a QGIS solution, you could use RivEX an ArcPro toolbox to answer this question, it has a tool Find all upstream site which will generate your desired output, a table listing all sites upstream of a site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.