[Qgis-developer] Fwd: Re: Memory Layers - some proposals

Victor Olaya volayaf at gmail.com
Thu Sep 25 08:24:27 PDT 2014


Since Processing has been mentioned a couple of times in the thread, just
some clarification:

- Processing can create memory layers, but only for native algorithms (that
is, not from SAGA, GRASS, etc). The option is available in the button aside
the text box where the destination path is entered
- All Processing layers are temporary, unless a path is entered, and they
are saved to a temp folder which is cleaned when the user closes QGIS
- There are warnings in the Processing documentation about not creating a
project with temp layers and to always enter a path if the layer is not an
intermediate result. Otherwise it will be lost. I think that i can improve
that and add a warning to pop up when the project is saved if it includes
temp layers, capturing the corresponding signal and checking that there are
no layers that are saved in the Processing temp path. Would that be too
intrusive?

Hope this helps



2014-09-25 17:15 GMT+02:00 Matthias Kuhn <matthias.kuhn at gmx.ch>:

>  Forwarded to list
>
>
> -------- Forwarded Message --------  Subject: Re: [Qgis-developer] Memory
> Layers - some proposals  Date: Thu, 25 Sep 2014 06:04:19 -0800  From: Gary
> Sherman <gsherman at geoapt.com> <gsherman at geoapt.com>  Organization: GeoApt
> LLC  To: Matthias Kuhn <matthias.kuhn at gmx.ch> <matthias.kuhn at gmx.ch>  CC:
> gsherman at geoapt.com
>
> On 9/25/14 1:10 AM, Matthias Kuhn wrote:
> > 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.
>
> I agree---I have a plugin that uses memory layers to display information
> abstracted from a database (with no QGIS data provider). This
> functionality is essential and should not be changed, rather additional
> features added to support interactive use through the UI.
> >
> > 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
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Gary Sherman
>
> Founder, QGIS Project
> Consulting: geoapt.com
> Publishing: locatepress.com
>
> We work virtually anywhere
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140925/bfe1c2df/attachment.html>


More information about the Qgis-developer mailing list