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.