[Qgis-developer] Memory data provider persistence

Chris Crook ccrook at linz.govt.nz
Thu Jul 26 13:21:44 PDT 2012


Good points.  I'm thinking perhaps the solution is to use Sqlite/spatialite (don't get me wrong - I like and use spatialite a lot).  But perhaps use the python spatialite driver directly, rather than the QgsVectorFileWriter class as I am currently doing, as I cannot see any OGR options for writing multiple layers to a single sqlite db.

I have a version working using the QDataStream, which goes well .. It shouldn't be too hard to modify that to use spatialite. 

You also mentioned losing data completely .. Is is possible that this was data that hadn't been saved before QGIS was closed (ie you were still in editing mode).  I think this may be a QGIS bug in 1.8.  On ubuntu I am finding that QGIS does not prompt for for uncommitted edits.  I'm sure that it used to do that..

Cheers
Chris



-----Original Message-----
From: haubourg [mailto:regis.haubourg at eau-adour-garonne.fr] 
Sent: Thursday, 26 July 2012 7:55 p.m.
To: qgis-developer at lists.osgeo.org
Subject: Re: [Qgis-developer] Memory data provider persistence

Having a specific memory storage have pros and cons that you explained very well Chris.
 From a user point of view, one drawback is that if something goes wrong in memory layer loading whe project opens, or on memory layer save, data is lost. So User will for sure ask for a "Add memory layer" provider.. because they will try to reopen that dataset they see with their project.  
That's why I prefer SQLlite, already easy to open. It stores vector or raster, is compact, no install...  BUT, we will be dependent of that tool and associated libraries, that's true. 
My bet is that Spatialite will be a MANDATORY tool for people who don't have postgis access or skills. One simple argument: it store long field names, and is fast.  So QGIS should stick close to spatialite as much as it does for postgis. If we all agree on that roadmap, it would not be so risquy to choose spatialite ..
Hope this helps..



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Memory-data-provider-persistence-tp4108012p4990975.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.

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 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