-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory data provider should not be saved #12547
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Radim Blazek (@blazek) There are cases when saving memory layers (without data) in project is useful, for example if layer symbology has to be customized by user but layer data are always refreshed by plugin. There are three possibilities to handle memory layers and all make sense in some situations:
It could be specified by new URI parameter but I am worried that it could be confusing for users.
|
Author Name: Chris Crook (@ccrook) Interesting point .. I'm not convinced about the last case (don't write layer to project). My feeling is that the if a user closes and reopens a project then nothing should change, certainly not without a warning. It is hard to think of a case when the user would want the layer preserved (unless they are abandoning the changes and not saving the project) - after all if they don't want the layer then they will delete it in QGIS, not expect it to magically disappear when they save the project and reopen it. At the moment this is implemented in the (non core) Memory Layer Saver plugin, which does include the option of not saving the layer (a plugin can set a layer property to tell the memory layer saver not to save the data). The current implementation saves the data in a portable binary stream format provided by the Qt framework in a file that sits next to the project file. I've found the plugin actually works very well as an approach - I no longer have to think about memory layers going away. If I was going to do anything with it now my inclination would be to put it into core, and perhaps port to C++ to remove the python dependency... |
Author Name: Regis Haubourg (@haubourg) +1 with Chris, Memory Layer Saver plugin is installed in default config here and IMHO should be ported to core. Anyway, having a separate file for data is confusing for users here. Other possibilities have been explored in an old thread on the list:
régis |
Author Name: Radim Blazek (@blazek) regis Haubourg wrote:
Please keep also the possibility to don't save layer data if needed (specified by URI param?). |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) End of life notice: QGIS 2.18 LTR
|
Author Name: Chris Crook (@ccrook)
Original Redmine Issue: 2487
Affected QGIS version: master
Redmine category:project_loading/saving
Layers built with the memory data provider should not be saved to the project file, as when the file is reloaded, the data for the layers is no longer available. This means that reloading the project does not restore it to its saved state.
I think that when Quantum saves a project then it should check for in memory layers, and provide the option of saving them to a persistent provider, or removing them from the project.
Also it would good when an in memory layer is saved to a shapefile (or other persistent provider) from the legend right click menu if the layer was replaced with the saved layer. This make it much easier to make in memory layers persistent in the project. At the moment I think you need to save the layer, then load the saved version, and then remove the in memory layer.
The text was updated successfully, but these errors were encountered: