I'm a total newbie at coding. I'm working with water catchments in QGIS. Runoff of some catchments feeds other catchments. I'm trying to get the cumulative run-off.
Each feature in the table has the following fields:
ID- each polygon's number
Fed by- the numerical ID of a polygon that feeds it
C- the (calculated) runoff capacity of that field
I would like to create a field
C-in that pulls the value of
C from another feature based on the
ID of that feature if it is written in
Fed by field.
I imagine it is something along the lines of: When
Fed by equals the value of an
C of that
ID, for example:
In particular, we have:
Fed by: 9,
Fed by: 19,
ID=20 should be: 0.5 (forget for a moment the
So what do I need to write in the field calculator to get this magic to happen?