[Qgis-developer] Implementing import layer feature

Giuseppe Sucameli brush.tyler at gmail.com
Thu Jul 28 04:22:56 EDT 2011


Hi devs, 
I'm starting to work on the import layer feature as part of my GSoC. 

The aim would be to add to providers the capability to import a QGis layer into databases. Creating a file is already managed by QgsVectorFileWriter, but I would move that code within the OGR provider. 

This feature would allow users to copy a layer between different databases or to save a layer loaded in canvas into dbs.

I need your opinion about the way I should use to call the provider's import method.

There're at least 2 possible ways to add the import method:
1. adding it as a static method and exporting it, 
2. adding it as a provider instance method.

IMHO the second approach could be better as it could be easily used by plugins too (just add the import method  to QgsVectorDataProvider), instead the first one needs to use QLibrary.

What do you think about it?
I'm abroad until 4 Aug, but I've connection, I can reply to emails.

Would be good start to discuss it now, so when I will come back I can start coding.

Cheers.

--
Giuseppe Sucameli


More information about the Qgis-developer mailing list