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 :

  1. create grid G with id unique field
  2. find GRIDSURF = cell area
  3. intersect grid G with polygon layer P
  4. dissolve intersected layer by attribute grid id
  5. 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 ?


closed as off-topic by PolyGeo Feb 4 '18 at 22:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Which operation do you perform in the Select code Ocsol step? – mgri Mar 20 '17 at 18:41
  • @mgri I am selecting a subset of Ocsol layer with a land cover code (criteria : fld_occup=val_text) before intersecting it with the grid – Cyril B Mar 21 '17 at 7:57
  • 2
    I tried to reproduce your issue, but it seems that everything works for me (but probably I skipped some crucial step). Is it possible to upload your model, preferably also including a sample of your two input layers? – mgri Mar 21 '17 at 8:46