1

I'm trying to calculate a field (Field calculator 2) in the model builder with an get_feature expression which should look something like this attributes(get_feature('LandUse_TD_HYBAS_dissolved_calc', 'NEXT_DOWN', "HYBAS_ID"))['Calc'] . The problem is that I don't know how to specify the layer. Normally I just enter the layer name 'LandUse_TD_HYBAS_dissolved_calc' which worked as I did it outside of the model builder, but seemingly isn't working in the model builder because the layer I want to use is calculated by another field calculation one step ahead (Field calculator 1).

Model

I have also tried to enter '@Field_calculator_1_OUTPUT' to specify the layer which did not work either(Picture 2).

Expression

What am I supposed to enter for the layer specification? Or is there another way to do it in the model builder?

1

I've found the answer:

You have to use the @layer variable to access the previous layer. So the expression looks like this attributes(get_feature(@layer, 'NEXT_DOWN', "HYBAS_ID"))['Calc'].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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