Announce: MemoryLayerSaver plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Announce: MemoryLayerSaver plugin

Chris Crook
Hi

I've just uploaded a MemoryLayerSaver plugin to the contributed plugins on pyqgis.org.

This makes memory data provider layers (such as those generated by the contour plugin) persistant.  Each layer is saved alongside the project file in sqlite files.  When the project is reloaded the memory layer data gets repopulated as it was.  (Without the plugin the layer remains in the project, but all the data gets lost).

To use the plugin, simply install it.  Once installed all memory layers in all projects will be saved with the project, until you uninstall it again.

Cheers
Chris
______________________________________________________________________________________________________

This message contains information, which is confidential 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 [hidden email]) 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.
______________________________________________________________________________________________________
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Announce: MemoryLayerSaver plugin

Ricardo Filipe Soares Garcia da
Hi Chris

This plugin is a very nice idea, thanks for it!

I encountered the following error while testing out:

Traceback (most recent call last):
  File "/home/geo2/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py",
line 40, in connectProvider
    QObject.connect(layer, SIGNAL("committedAttributesDeleted(const
QString &, const QgsAttributeIds )"),self.setProjectDirty2)
TypeError: type 'QgsAttributeIds' is not supported as a slot argument type


In case it is relevant:
- I was testing it using the 'HighWays' spatialite layer, present in
the spatialite testing dataset [1]
- I was testing it against the 'Profile from line' plugin, that
generates temporary layers using the memory provider. This plugin is
in the QGIS contributed repository
- Iam using QGIS 1.6 as available in the ubuntugis-unstable ppa

Thank you


[1] - http://www.gaia-gis.it/spatialite/resources.html



On Tue, Dec 21, 2010 at 1:14 AM, Chris Crook <[hidden email]> wrote:

> Hi
>
> I've just uploaded a MemoryLayerSaver plugin to the contributed plugins on pyqgis.org.
>
> This makes memory data provider layers (such as those generated by the contour plugin) persistant.  Each layer is saved alongside the project file in sqlite files.  When the project is reloaded the memory layer data gets repopulated as it was.  (Without the plugin the layer remains in the project, but all the data gets lost).
>
> To use the plugin, simply install it.  Once installed all memory layers in all projects will be saved with the project, until you uninstall it again.
>
> Cheers
> Chris
> ______________________________________________________________________________________________________
>
> This message contains information, which is confidential 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 [hidden email]) 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.
> ______________________________________________________________________________________________________
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
___________________________ ___ __
Ricardo Garcia Silva
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

RE: Announce: MemoryLayerSaver plugin

Chris Crook
Hi Ricardo

Thanks for this  .. I think it is because I missed an "&" after the QgsAttributeIds in that line, id

    QObject.connect(layer, SIGNAL("committedAttributesDeleted(const
QString &, const QgsAttributeIds &)"),self.setProjectDirty2)

Oddly, it worked fine on my version :-(

You could try editing the file and see if that fixes it.  I'll upload an amended version now.

Cheers
Chris
________________________________________
From: Ricardo Filipe Soares Garcia da [[hidden email]]
Sent: 22 December 2010 00:16
To: qgis-user
Subject: Re: [Qgis-user] Announce: MemoryLayerSaver plugin

Hi Chris

This plugin is a very nice idea, thanks for it!

I encountered the following error while testing out:

Traceback (most recent call last):
  File "/home/geo2/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py",
line 40, in connectProvider
    QObject.connect(layer, SIGNAL("committedAttributesDeleted(const
QString &, const QgsAttributeIds )"),self.setProjectDirty2)
TypeError: type 'QgsAttributeIds' is not supported as a slot argument type


In case it is relevant:
- I was testing it using the 'HighWays' spatialite layer, present in
the spatialite testing dataset [1]
- I was testing it against the 'Profile from line' plugin, that
generates temporary layers using the memory provider. This plugin is
in the QGIS contributed repository
- Iam using QGIS 1.6 as available in the ubuntugis-unstable ppa

Thank you


[1] - http://www.gaia-gis.it/spatialite/resources.html



On Tue, Dec 21, 2010 at 1:14 AM, Chris Crook <[hidden email]> wrote:

> Hi
>
> I've just uploaded a MemoryLayerSaver plugin to the contributed plugins on pyqgis.org.
>
> This makes memory data provider layers (such as those generated by the contour plugin) persistant.  Each layer is saved alongside the project file in sqlite files.  When the project is reloaded the memory layer data gets repopulated as it was.  (Without the plugin the layer remains in the project, but all the data gets lost).
>
> To use the plugin, simply install it.  Once installed all memory layers in all projects will be saved with the project, until you uninstall it again.
>
> Cheers
> Chris
> ______________________________________________________________________________________________________
>
> This message contains information, which is confidential 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 [hidden email]) 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.
> ______________________________________________________________________________________________________
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
___________________________ ___ __
Ricardo Garcia Silva

______________________________________________________________________________________________________

This message contains information, which is confidential 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 [hidden email]) 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.
______________________________________________________________________________________________________
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Announce: MemoryLayerSaver plugin

Borys Jurgiel-2
Hi Chris,
The plugin doesn't ignore raster layers and causes the following error
everytime when a raster is being loaded:

  File
"/home/borys/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py", line
86, in isSavedLayer
    if l.dataProvider().name() != 'memory':
AttributeError: 'NoneType' object has no attribute 'name'
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

RE: Announce: MemoryLayerSaver plugin

Chris Crook
Thanks Borys

I've uploaded a version that fixes this.

I've also set the plugin status to "experimental", as I've found that deleting features in memory layers is crashing Qgis on windows :-(  I can't find a bug in my code .. I think it is something deeper. I'll take it to the developer list though.

Cheers
Chris

-----Original Message-----
From: Borys Jurgiel [mailto:[hidden email]]
Sent: Wednesday, 22 December 2010 11:57 p.m.
To: [hidden email]
Subject: Re: [Qgis-user] Announce: MemoryLayerSaver plugin

Hi Chris,
The plugin doesn't ignore raster layers and causes the following error everytime when a raster is being loaded:

  File
"/home/borys/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py", line 86, in isSavedLayer
    if l.dataProvider().name() != 'memory':
AttributeError: 'NoneType' object has no attribute 'name'

______________________________________________________________________________________________________

This message contains information, which is confidential 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 [hidden email]) 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.
______________________________________________________________________________________________________
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user