Hi

I think the change in behaviour is due to the change in the gdal 1.9 
implementation of the GML driver, which generates the fid field when the layer 
is reloaded.  I am looking at a fix that basically removes the field after it 
is reloaded.
Not an ideal solution (especially if you want a field called "fid").

On you other points on the memory layer saving, it may be worth reviewing the 
earlier discussions about the memory layer saver.

http://lists.osgeo.org/pipermail/qgis-developer/2010-December/011876.html

I have a couple of times proposed that memory layers get saved alongside the 
project or within the project file.  Inside the project file is not a good idea 
- it could easily get too big.  

So the main question for the ideal solution is how to store the information.  I 
am using the GML format as a preferrred open format (preferred in this case 
based on responese on the qgis dev list).  I'm inclined to modify this to a 
format that uses a single file for all the layers as a cleaner implementation 
from the users perspective (eg if the project file is test.qgs then the 
persisted data is in test.qgs.db, or something like that).  The format could be 
spatialite perhaps, or a zip file of the gml files?  It would also get rid of 
the horrible long file names.

I see in your bug post that you have found that sometimes the layers don't get 
saved at all.  I haven't experienced this, but I did notice that if you start 
editing a layer, add some features, and then quit qgis without saving the 
edits, then there is no prompt for saving the edits.  If the edits don't get 
saved then the memory saver plugin doesn't flag the project as dirty, and so 
the changes don't get saved.  Could this match your example?

Cheers
Chris Crook


-----Original Message-----
From: haubourg [mailto:[email protected]] 
Sent: Saturday, 21 July 2012 1:55 a.m.
To: [email protected]
Subject: Re: [Qgis-developer] Memory data provider persistence

Hi all,
one up for this topic. Since QGIS 1.8, memory layer saver is not working the 
same way as in 1.7.4.
I raised a tickets here  http://hub.qgis.org/issues/6075
http://hub.qgis.org/issues/6075 , but I think something changed in memory layer 
provider or OGR GML provider, and it maybe isn't a plugin issue:

In fact, FID field was previously hidden to end user in QGIS but was present in 
GML.  It was filled with "F"+id . It now is filled with "projectName."+id. FID 
field is now shown to end user whic alterates table structure when saving. 
Reopening project, saving and reoping a second time add a second FID field. 

Anyone has an idea of what's going on ? 

BTW *I'am really interested to have a stable way of saving memory layers along 
with project.Anyone still working on it ? Having it part of the Core would be 
great too. I am ready to sponsor it since it. * What solution should we keep? 
gml+xsd along with project? A dialog asking what memory layers to save, and 
explaining what are thoses gml and xsd files would be nice too. I have seen 
users cleaning up those messy files since they did not understand what they 
were.. 




--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Memory-data-provider-persistence-tp4108012p4989667.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 
[email protected]) 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-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to