[Qgis-user] Modeler: Using Vector field input with multiple fields

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Sun Sep 13 05:00:41 PDT 2020


Hi there,

I am trying to use the "Vector Field" input with more than one field in
a model for generating atlas zones:
To create individual oriented bounding boxes over polygon sketches, I
need to create an individual attribute for each polygon. The problem is
that the individual distinction of a polygon is defined through at
least  two fields (lets call them "location" and "zone")
As the zone names get repeated over the different locations, only the
combination of location and zone will identify the individual plot.

In the vector field input, there is the possibility to mark multiple
fields from a vector layer as input.
My idea was now, to create a new field "combi" from the marked fields
and use it to create my oriented boxes.

The question is now, how the value in the multi-field input is stored
and how I can extract the individual parts for usage in the field
calculator.
Given my vector field input is names "groupingfields", I can access it
in the field calculator as @groupingfields.

But how can I extract the values, so that in pseudocode the "combi"
field expression will look like '@groupingfield[1] || '_' ||
@groupingfield[2] (which of course does not work, thats why I'm asking) ?

I case the question arises, why I do not simply create that combi-field
beforehand for my polygons outside of the model: Simply, I do not want
to. I want to be the master of my data, and not its slave ;)

Thanx for any input,

Bernd



More information about the Qgis-user mailing list