How to specify dependable layer names in QGIS Processing Modeller

Geographic Information Systems Asked by Bruce Mitchell on December 6, 2020

I am creating a model in QGIS (3.10.3) Processing Modeller (Win 10[64]).

The objective is to create Voronoi polygons from centroids that are clipped to a higher, polygon, geometry. This produces clip slivers that either do (Voronoi-with-centroid) or do not (‘merger-candidates’) contain an centroid.

I create a UUID for every Voronoi (whether it has a centroid or not).

Then identify the neighbours, and the shared boundary lengths as per:

Then dissolve the merger-candidates into the neighbouring Voronoi-with-centroid with which it shares the longest boundary.

I am quite happy with this approach and am confident it will produce the result I want.

However, my model (see GoogleDrive link below) is doing something odd.

The command ‘create UUID’ does what it should, but additionally, adds a UUID to the layer name.

So, for the next instruction – ‘Identify Neighbours’ – when I enter the Expression dialog, QGIS offers all the ‘…_OUTPUT’ from the previously completed instructions. But ‘Create_UUID_OUTPUT’ doesn’t appear to be the right thing to include in the "spatialthoughts" code.

My adaptation of that code is, so far:



aggregate:='array_agg' ,


filter:=intersects($geometry, geometry(@parent))


If I double-click Create_UUID_OUTPUT on the right in Processing Modeller, @Create_UUID_OUTPUT appears in the code window on the left. When this is added into layer:= this then generates:
"Eval Error:Cannot find layer with name or ID ” "

So I looked at the "Map Layers" drop down on the right.

Sure enough, there is a "Voronois_fixed_with_UUIDs" layer, which is exactly what I would have expected, so, I thought, let’s use that.

However, when I double-click that, I get ‘Calculated_11a2a0f5_618c_4b85_90e9_07c97cdf360b’ on the left.

So, the layer name itself has gained a UUID, and this changes every time I run the model. No, no, no. I do not want that.

I expect "Voronois_fixed_with_UUIDs" to be the layer name, for this not to change, and for it to appear in the code on the left when double-clicked on the right.

In QGIS desktop, the layer does appear with that name. Its properties may be seen at the bottom of this post.

So I have two questions:

  1. How do I stop the "Create_UUID" instruction adding a UUID to the layer name?
  2. What should I put in the line "layer:= ## THIS IS WHAT DOESN’T WORK YET ##, "

Many thanks for your attention: I would very much appreciate any guidance you can offer.

The QGIS model may be downloaded from my GoogleDrive:

Layer properties in QGIS
(note, there’s a UUID, but it’s different – due to having run the model again):






Memory storage





Polygon (MultiPolygon)


EPSG:27700 – OSGB 1936 / British National Grid – Projected


446240.0011192215606570,92182.7952580302953720 : 453679.9979932568967342,96610.0049105565994978



Feature count


Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP