Hi Nicolas,
thank you for your quick reply. I am not sure if I understand correctly what
you are suggesting, because the ‘join by attribute’ and ‘aggregate’ functions
both will change the attributes of the vector layer.
What I´m trying to do instead is to give a list of field names as a parameter
to the function ‘statistics by categories’, and my problem is that I don´t have
this single list, but two separate lists that each contain a part of these
field names. So I would like to merge the two lists of field names and pass it
over to the algorithm, but I have no idea how to do this.
Another solution could be to perform the ‘union’ first, and only afterwards ask
the user to specify the field names for evaluation. Unfortunately, I have no
idea either how to determine a chronological sequence where the ‘vector field’
input is queried after the ‘union’ has already been performed.
Thank you very much for your help,
Simon
Von: Nicolas Cadieux <njacadieux.git...@gmail.com>
Gesendet: Mittwoch, 26. Januar 2022 17:21
An: Simon Dietmann <simon.dietm...@pgnu.de>; qgis-user@lists.osgeo.org
Betreff: Re: [Qgis-user] model builder - merge several inputs
Hi,
You could try a "join attribute by location" followed by a "Aggregate"...
Nicolas
On 2022-01-26 3:43 a.m., Simon Dietmann wrote:
Dear list,
I am trying to find a solution for the following problem with the model builder:
My model asks for two vector polygon layers that will be combined by ‘union’.
The resulting layer gets a new field (field calculator) and is evaluated by
‘Statistics by categories’ algorithm. The fields for the categories are
selected by the user when calling the model. Since those fields are present in
the two separate input layers, I have to use two separate ‘Vector field’ inputs.
The problem arises when I try to combine those two input variables to use them
together for the ‘Statistics by categories’ algorithm. AFAICS there is no
function inside the model builder to achieve this, so I suggest I have to
export the model as a python script. There I found that the call of the
Statistics function gives the name of the variable as a parameter and not the
variable itself:
alg_params = {
'CATEGORIES_FIELD_NAME': parameters['fields'], ….
How can I combine my two lists (~like “parameters[‘fields’+’fields2’], or is
there a way to do this inside the model builder that I didn´t find?
Thanks in advance for help, kind regards
Simon Dietmann
Mit freundlichen Grüßen
im Auftrag
Simon Dietmann
M.Sc. Physische Geografie
Aufgrund der aktuellen Situation bin ich zur Zeit vermehrt im Home Office tätig
und dort erreichbar unter +49 69 – 57 80 56 98 oder per Email, ich rufe Sie
dann gerne zurück.
PGNU Planungsgesellschaft Natur & Umwelt mbH
Amtsgericht Frankfurt am Main, HRB 111938
Geschäftsführer: Dr. Benjamin Hill, Johannes Christoph Kress, Alexander von
Küchler
Hamburger Allee 45 +++ D-60486 Frankfurt am Main
Durchwahl: +49 (69) 95 29 64 - 75 +++ Fax: +49 (69) 95 29 64 – 99
E-Mail: dietm...@pgnu.de +++ Web: www.pgnu.de
> Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen
> enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly forbidden.
_______________________________________________Qgis-user mailing
listQgis-user@lists.osgeo.orgList info:
https://lists.osgeo.org/mailman/listinfo/qgis-userUnsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-user-- Nicolas
Cadieuxhttps://gitlab.com/njacadieux
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user