Not exactly what you are asking for, so it may not suit, but I find the “memory 
layer saver” plugin invaluable.
When using this memory layers are not lost when you close QGIS

The plugin description says
“Makes layers with memory data providers persistent
so that they are restored when a project is closed and reopened.
The memory provider data is saved in a portable binary format (QDataStream)
that is saved with extension .mldata alongside the project file.”

I’m not sure if the .mldata file is useful as an export format.

It also does not seem to work with temporary raster files.

You can drag and drop memory layers from one QGIS instance to another (at least 
in 3.16).  They will then persist separately in both QGIS files if you have the 
memory layer saver plugin installed.

Michael Dufty

From: Qgis-user <qgis-user-boun...@lists.osgeo.org> On Behalf Of David Strip
Sent: Friday, 22 January 2021 2:42 AM
To: qgis-user <qgis-user@lists.osgeo.org>
Subject: [Qgis-user] saving all temporary layers?

Before I write my own, does anyone have a script to share (processing or 
otherwise) that saves all temporary layers in a project, preferably to a 
geopackage?
Thanks
David
_______________________________________________
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