[Qgis-developer] fTools dev - write to any ogr format or to memory layer

Rob Nickerson rob.j.nickerson at gmail.com
Wed Jul 25 16:11:16 PDT 2012


Hi all,

Thanks for the support earlier in the month when I was asking about how to
improve the fTools plugin so that it can save to any ogr file format. I
have now had the time to get up to speed with the qgis documentation and
have had a quick play with the code.

In my original question I was provided 2 solutions:

1. Nathan W suggested that I change the plugin so that it writes to a
memory layer (I've got this working in a test case).
2. Giuseppe S pointed me in the correct direction to allow saving to any
ogr format (I believe I could do this)

Question: Which is preferred? Is the memory layer quicker? How does the
memory layer compare when working with large datasets?

To me it seemed odd that the fTools was asking to save the result to a new
file (after all I was asking for some geometry analysis), but a memory
layer has to be manually saved otherwise you risk loosing it. If someone
can point me in the direction of a snippet of python that would pull up the
Layer->Save As... window that would be awesome. Otherwise if this is not
possible, in order to have a save dialogue at the end of the plugin
execution you would be looking at implementing save to any ogr format
again!!

All thoughts welcome,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120726/25caf2b7/attachment.html>


More information about the Qgis-developer mailing list