[prev in list] [next in list] [prev in thread] [next in thread]
List: qgis-user
Subject: Re: [Qgis-user] batch operation on gpkg with multiple layers
From: Nicolas Cadieux <njacadieux.gitlab () gmail ! com>
Date: 2021-09-24 11:05:47
Message-ID: AB3ADB17-9313-421D-B9DA-F9A0C475F462 () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thanks,
I will check it out on Monday. Could be very useful.
Nicolas Cadieux
https://gitlab.com/njacadieux
> Le 24 sept. 2021 à 02:47, Jésahel Benoist <djes1975@gmail.com> a écrit :
>
> 
> 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@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 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
[Attachment #5 (text/html)]
<html><head><meta http-equiv="content-type" content="text/html; \
charset=utf-8"></head><body dir="auto">Thanks,<div><br><div>I will check it out on \
Monday. Could be very useful. <br><br><div dir="ltr">Nicolas \
Cadieux<div><a href="https://gitlab.com/njacadieux">https://gitlab.com/njacadieux</a></div></div><div \
dir="ltr"><br><blockquote type="cite">Le 24 sept. 2021 à 02:47, Jésahel Benoist \
<djes1975@gmail.com> a écrit :<br><br></blockquote></div><blockquote \
type="cite"><div dir="ltr"><div dir="auto">Hi Nicolas,<div \
dir="auto"><br></div><div dir="auto">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 :</div><div dir="auto"><div dir="auto"> \
selectedLayers = \
iface.layerTreeView().selectedLayersRecursive()</div><div dir="auto"> \
for layer in selectedLayers:</div><div dir="auto"> \
layer.startEditing()</div><div dir="auto">;Do your stuff \
here</div><div dir="auto"> \
layer.triggerRepaint()</div><div dir="auto"><br></div><div dir="auto">I've created a \
basic plugin (<a href="https://github.com/djes/MultipleLayersTools">https://github.com/djes/MultipleLayersTools</a>) \
for my own needs, take a look at the code. If I have time I could add some of your \
needs.</div><div dir="auto">Btw, using geopackage is great for exchange and backup. \
But a real db server is a must have. </div><div dir="auto"><br></div><div \
dir="auto">Regards,</div><div dir="auto"><br></div><div \
dir="auto">Jésahel</div></div><div dir="auto"><table \
style="border-spacing:0px;border-collapse:collapse;color:rgb(36,41,47);font-family:-apple-system,blinkmacsystemfont,"segoe \
ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui \
emoji";font-size:14px;background-color:rgb(255,255,255)"><tbody><tr><td \
style="padding:0px 10px;line-height:20px;vertical-align:top;font-family:'ui-monospace','sfmono-regular','sf \
mono','menlo','consolas','liberation \
mono',monospace;font-size:12px;white-space:pre"></td></tr></tbody></table></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 23 sept. 2021 Ã 22:33, \
Nicolas Cadieux <<a \
href="mailto:njacadieux.gitlab@gmail.com">njacadieux.gitlab@gmail.com</a>> a \
écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Hi,</p>
<p>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:</p>
<ul>
<li>Perform field calculator operations on each layer within the
geopackage<br>
</li>
<li>Split all geopackage layer with a field<br>
</li>
<li>Merge multiple layers in a new geopackage</li>
</ul>
<p>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.)<br>
</p>
Nicolas<br>
<pre cols="72">--
Nicolas Cadieux
<a href="https://gitlab.com/njacadieux" target="_blank" \
rel="noreferrer">https://gitlab.com/njacadieux</a></pre> </div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank" \
rel="noreferrer">Qgis-user@lists.osgeo.org</a><br> List info: <a \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer noreferrer" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" \
rel="noreferrer noreferrer" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br> \
</blockquote></div> </div></blockquote></div></div></body></html>
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic