Hi all,<div><br></div><div>This is a very interesting idea indeed.  My personal preference would be a zip file with the xml file inside for the project file, and other files for the extra stuff eg memory layers, styles, images.</div>

<div><br></div><div>So:</div><div><br></div><div>MyProject.zqgs &lt;- zip file with custom extension.</div><div>        |</div><div>        |&gt; MyProject.qgs &lt;- Project file</div><div>        |</div><div>        |&gt; MyProectMemory.sqllte &lt;- <meta http-equiv="content-type" content="text/html; charset=utf-8">spatialite database</div>

<div>        |</div><div>        |&gt; Other files, maybe some project specific qml files, images etc</div><div><br></div><div>My reason for using just a plan zip file with everything in it would be; it makes it easier to get to the project file if needed; allows for as many items as needed in the future; don&#39;t need anything special to view the content. </div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>As far as I am aware Steam, the gaming engine, does the same kind of thing with its game files.</div><div><br></div><div>Just my 2 cents worth.  </div>

<div><br></div><div>- Nathan<br><br><div class="gmail_quote">On Sat, Dec 4, 2010 at 1:35 PM, Chris Crook <span dir="ltr">&lt;<a href="mailto:ccrook@linz.govt.nz">ccrook@linz.govt.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Martin and list readers<br>
<br>
Interesting idea!  This would certainly achieve my main goal, which is to have the project reopen with the same information in as when I closed it.<br>
<br>
I agree that saving the the XML file could be cumbersome - even though these are only memory provider layers I guess they could get quite big.  And very good point about loading from the DOM.<br>
<br>
Another way to achieve a similar result could be to embed the project file in the spatialite database?  That would make the memory provider data easier to use - basically it just becomes a spatialite provided layer.  The project itself becomes harder to manually edit, if you wanted to do so.  However it could easily be exported to a separate file if that is required.  And the whole thing could still be zipped if you wanted to.<br>


<br>
I don&#39;t see these options as exclusive.<br>
<br>
Look forward to comments,<br>
Chris<br>
<br>
________________________________________<br>
From: Martin Dobias [<a href="http://wonder.sk" target="_blank">wonder.sk</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>]<br>
Sent: 03 December 2010 11:01<br>
To: Chris Crook<br>
Cc: <a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a><br>
Subject: Re: [Qgis-developer] Memory data provider persistence<br>
<div><div></div><div class="h5"><br>
Hi Chris<br>
<br>
On Mon, Nov 29, 2010 at 8:54 PM, Chris Crook &lt;<a href="mailto:ccrook@linz.govt.nz">ccrook@linz.govt.nz</a>&gt; wrote:<br>
&gt; Hi All<br>
&gt;<br>
&gt; I&#39;m looking for ideas/suggestions/comments on the memory data provider.<br>
&gt;<br>
&gt; A while ago I raised a ticket <a href="http://trac.osgeo.org/qgis/ticket/2487" target="_blank">http://trac.osgeo.org/qgis/ticket/2487</a>, the essence of which is that if you save and reload a project nothing should have changed, but if you have a layer supported by a memory data provider then its contents get lost.<br>


&gt;<br>
&gt; In the ticket I suggested that the user should be warned on saving, and the layers not included in the project file.  That way at least you don&#39;t end up with empty layers.<br>
&gt;<br>
&gt; I&#39;m now coming to a different point of view, which is that it would make much more sense to save the data for the memory provider into the project file.<br>
<br>
Having a possibility to save the data into a project would be a nice<br>
feature. However I think that saving the features directly into the<br>
XML project file wouldn&#39;t scale well with the amount of data. It can<br>
work well for small datasets, though I&#39;m afraid that it will fail with<br>
a lot of data. One reason is that the project file would get pretty<br>
big due the verbosity of XML, another problem would be with the memory<br>
footprint and parsing speed - we&#39;re using DOM.<br>
<br>
I have started to think about a more radical step: to allow the<br>
projects to be not only XML files, but additionally they could be e.g.<br>
ZIP files with project XML file inside and optionally some more files.<br>
AFAIK OpenDocument format (used in OpenOffice) does this too.<br>
Internally QGIS could ask the user and convert his data from memory<br>
provider (or any other provider) to e.g. spatialite database that<br>
would be included in that project ZIP file.<br>
<br>
This would involve the following changes:<br>
- implement reading and writing of compressed project files (using zlib)<br>
- write a generic QgsVectorLayer -&gt; SpatiaLite export class (similar<br>
to QgsVectorFileWriter or an extension of it)<br>
- add support to read/write &quot;embedded&quot; layers<br>
<br>
This would also enable a nice feature to let QGIS pack all data into<br>
one (compressed) file and pass just that file around!<br>
<br>
What do you (and others) think of such solution?<br>
<br>
Regards<br>
Martin<br>
</div></div>______________________________________________________________________________________________________<br>
<br>
This message contains information, which is confidential and may be subject to legal privilege.<br>
If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.<br>
If you have received this message in error, please notify us immediately (Phone 0800 665 463 or <a href="mailto:info@linz.govt.nz">info@linz.govt.nz</a>) and destroy the original message.<br>
LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.<br>
<br>
Thank you.<br>
______________________________________________________________________________________________________<br>
<div><div></div><div class="h5">_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>