[Qgis-developer] Memory Layers - some proposals
Matthias Kuhn
matthias.kuhn at gmx.ch
Thu Sep 25 02:10:41 PDT 2014
Aren't there two different possibilities in which such layers can be used:
* As a scratch layer for the user, which he may want to save in the end
* As a means for plugins to show information to the user
In the first scenario, the user may actually want to save the
information because he realized in the process of drawing it, that it's
valuable to him (if he would have known from the beginning, he could
have started with a permanent layer type). In this case it would be nice
to make the user aware of the risk of loosing data and offer him a
simple way to save it (to an OGR supported format).
In the second scenario, the information may be completely reproducible
by the plugin or the information drawn by the user intercepted by the
plugin and redirected to suitable places. In such a scenario a "Do you
want to permanently save?" dialog would not be appropriate. And
therefore there should be a possibility to disable it.
On the other hand, I also tend to use my /tmp folder on my machine for
data I use to play around for the next couple of minutes but that I am
completely aware of that it can be lost anytime (and I don't want my
computer to ask me: "Hey, you have saved that download to /tmp and I'm
going to delete it now, is that ok for you?"). So I tend to disagree
with Sandros "why would you want to loose the data?" and answer it with
"because it's intermediate, volatile and/or temporary."
All in all: there are two scenarios, one with manual operation, one with
plugins. The second one needs to be controlled by python, the first one
is about awareness. This awareness can be achieved by one or more of the
following
* Icons
* Message bar (e.g. when starting to digitize "You are digitizing on a
temporary layer. Do you want to convert it to a permanent layer? Click
here.")
* Message box when removing the layer from the canvas/closing the app
"There is unsaved information, you will loose it unless you donate 5$ to
the QGIS project. Click here"
Or did I get this wrong?
Matthias
More information about the Qgis-developer
mailing list