I am trying to create a model with QGIS to intersect a polygon layer P with a vector grid G and find the % of P for every cells of G. These are the steps to find this :
- create grid G with id unique field
- find GRIDSURF = cell area
- intersect grid G with polygon layer P
- dissolve intersected layer by attribute grid id
- calculate PSURF = dissolved polygons area / GRIDSURF
My problem with the modeler is that, in step 5, the modeler can't find the field GRIDSURF created in step 2
What I really don't understand, is that in the following model with 2 outputs, the GRIDSURF field (with
$area formula) is in the result_grid output layer, but this same field is not in the layer submitted to INTERSECT ... and I have an error after the DISSOLVE saying that the GRIDSURF field is not found.
Did I miss something ?