[Qgis-developer] Memory Layers - some proposals

Chris Crook ccrook at linz.govt.nz
Fri Sep 26 12:10:49 PDT 2014


Hi

I think this depends a bit upon your perception of the world.  As a developer you are aware that this is a memory layer, and so volatile by nature.

On the other hand as a user this is not necessarily a memory layer, it is just part of your project, and may have come from some plugin or process that didn't explicitly mention "memory layer".  So they expect their data to be saved when they close the project.

I don't think anyone could question whether or not QGIS should warn you if you are going to lose data.  It shouldn't casually discard information you have worked on.

So the only question in my mind is whether or not it can save the memory data without requiring you to save it to some GIS format.  I think the answer is that it should (but then I'm biased - I wrote the MemoryLayerSaver plugin to address this issue for myself).

Again from a user point of view I think this data is part of the project, so it makes sense to save it with the project.  It isn't necessarily something that is wanted for anything else.  So why would they be bothered with having to choose a format and file location to do so.

Secondly there is convenience.  Sometimes you just want to be able to save the project and switch to some other work without having to worry about all sorts of "are you sure" or deciding where to save bits that you thought were part of the project.

The MemoryLayerSaver plugin at the moment saves to a QDataStream - a completely unconventional format chosen for convenience as it minimizes the risks of altering data by moving to another format.  I think SQLite would be cleaner.  However the main point of the memory layer is that it isn't used by anything else ... so I don't see this as a big drawback compared to the advantages of having the layers saved.

Cheers
Chrsi
________________________________________
From: Matthias Kuhn [matthias.kuhn at gmx.ch]
Sent: 25 September 2014 19:19
To: Nyall Dawson
Cc: qgis-developer
Subject: Re: [Qgis-developer] Memory Layers - some proposals

Hi,

Please excuse my ignorance, but

Why would you want a memory (as in RAM) layer when you want permanent data?

For portability reasons?
That's fine, but then we should offer a possibility to support
portability support for a real geo-format (with spatial index and all
the goodies). To stuff it into the project file there can be support
from a plugin, but I would not vote for adding this to core.

To me it seems that the current demand for this comes mainly from wrong
expectations created by the name (and people subsequently loosing data).
And we can fix the name.
For the portability issue, I'd rather go the longer way but get it right.

Regards
Matthias


This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.


More information about the Qgis-developer mailing list