[Qgis-user] batch operation on gpkg with multiple layers
Jésahel Benoist
djes1975 at gmail.com
Thu Sep 23 23:47:43 PDT 2021
Hi Nicolas,
I had similar questions and so I looked and found that it's easy to mix
normal qgis (like loading all layers, using intensively the great browser
panels to drag'n'drop), some tools (like the packaging tool) and some basic
python with this simple loop :
selectedLayers = iface.layerTreeView().selectedLayersRecursive()
for layer in selectedLayers:
layer.startEditing()
;Do your stuff here
layer.triggerRepaint()
I've created a basic plugin (https://github.com/djes/MultipleLayersTools)
for my own needs, take a look at the code. If I have time I could add some
of your needs.
Btw, using geopackage is great for exchange and backup. But a real db
server is a must have.
Regards,
Jésahel
Le jeu. 23 sept. 2021 à 22:33, Nicolas Cadieux <njacadieux.gitlab at gmail.com>
a écrit :
> Hi,
>
> Before I go to my default mode and python my way through this, is there a
> plugin that would permit me to perform batch operation on all the layers
> found in a single .gpkg file? My geopackages contain hundreds of layers
> (from autocad) (contain identical data structures) and I would like to do
> things like:
>
> - Perform field calculator operations on each layer within the
> geopackage
> - Split all geopackage layer with a field
> - Merge multiple layers in a new geopackage
>
> I guess FME would be another way out? I there an OpenSource equivilant to
> this? (I have a home version but I need to respect the license for this
> one.)
> Nicolas
>
> --
> Nicolas Cadieuxhttps://gitlab.com/njacadieux
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210924/f8bb53b5/attachment.html>
More information about the Qgis-user
mailing list