[Qgis-user] Graphical Modeler to add same datasource multiple times with different styles

Seggie, Graeme Graeme.Seggie at sepa.org.uk
Tue Nov 15 02:23:37 PST 2022


PUBLIC

Hello,

I am trying to use the graphical modeller to do something which seems simple but will help users set up a map quickly based on refreshed data and existing styles. Basically, add the same geopackage source to map and style using the algorithm 'Load layer into project' then style with algorithm 'Set style of vector layer' several times using different qml files. Even with multiple pairs of this setup, every successive added layer overwrites in the table of contents the same, single layer as the ID of the layer seems to be retained from first use of  'Load layer into project' and is therefore use for each new style rather than a new, separate layer.

I tried to get round this by keeping simple and running the pair of steps as a batch call of process with different style each time, same result. Then tried calling the running a parent model, calling other models doing the work, but I still end up with a single layer on the map, the last one styled. Am I missing something to refresh the layer added ID so that each one is unique and styled separately?

Regards,

Graeme Seggie



PUBLIC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221115/88e0d02a/attachment.htm>


More information about the Qgis-user mailing list