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 <mailto:dietm...@pgnu.de> +++ Web: www.pgnu.de <http://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 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

--
Nicolas Cadieux
https://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

Reply via email to