I am currently in the creating a process in my QGIS model builder where I am trying to rename a finished process layer based on some best practice rules. Here is the model:

enter image description here Now here is the expression I am using to rename my layer:

"algplanid" || '_' || 
WHEN to_string(@benoemingcontouren) ='0'
WHEN to_string(@benoemingcontouren) ='1'
WHEN to_string(@benoemingcontouren) ='2'

"algplanid" only has one Value to speak off in its column so it should not matter much. so in the End it should look like this: RUP_xxxxx_xxx_xxxxx_xxxxx_CT (xxx are numbers but are censored for privacy)

Now the problem:

Why does my rename layer algorithm do not seem to output, there is not even a temporary output function, what is going on here? And is there even another way to get this done?


I have just encountered this issue myself. My workflow is to run 5 PostgreSQL Execute and Load algorithms, use the rename algorithm to rename each, and then use Package to join them into one Geopackage. I found that though the rename layer algorithm does not seem to output it doesn't matter. I could package the output of the five 'PostgreSQL Execute and Load' algorithms and each would have the correct name as long as I added the rename algorithms as dependencies in the package algorithm.


There is already an issue ticket about this and this is related to how layers are handled in the modeler.

As rename need to act on an existing layer it doesn't do anything since only the output layers from the modeler are all converted to qgsmaplayers/real layer, once the model is done running.

I recall at least one other tool having this issue.

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.