[Qgis-developer] RFC vector data providers handling
godofredo contreras
frdcn at hotmail.com
Tue Apr 22 11:57:10 EDT 2008
Hi:
> Date: Mon, 21 Apr 2008 00:07:42 +0200
> From: jef at norbit.de
> To: qgis-developer at lists.osgeo.org
> Subject: [Qgis-developer] RFC vector data providers handling
>
> Hi there,
>
> I've looked at Godofredo's ogr-plugin-branch and ported it to trunk (see the
> patch [1]) with some modifications. I skipped the QgsConnectionRegistry and
> QgsConnectionParameters and also removed QgsDataSourceURI at all. As I think
> both spread information where it doesn't belong.
>
> I think we should do that a bit different. First of all the notation of a
> datasources should be private to the provider. So I think it's not good to mix
> connection parameters of different providers.
Yes, I also think that notation should be private to the provider. This way we can
add new types easier without touching any other code(OGR case).
> It's probably best to keep that information in a QDomNode instead of a string
> That could also be used in the project file: datasource and provider there
> should be replaced with something like dataprovider that aggregates provider
> name and the private datasource.
> In the process QgsDbSourceSelect should be renamed to QgsSourceSelect.
> The gui should list should list the registered vector data providers (classes).
I was thinking a little about this and I think we can unify raster, vector (file based)
and vector(database based) and even wfs and wms in a dialog. This way we can simplify a lot
the gui.
> Each data provider should have a private list of connections (ie. database
> connection in PostgreSQL, datasources in OGR) and offer class methods to
>
> - list connections by name,
> - remove a connection by name,
> - add and edit new connections (this would include a provider specific gui),
> - return a list of datasource with the available vector layers through a named
> connection (ie. layers in OGR, geometry columns in PostgreSQL). To support
> provider specific grouping (eg. for schemas in the PostgreSQL provider) that
> could be aggregated in a QDomNod.
>
> The OGR provider gui should also include filebased sources, so that "add vector
> layers" can be completely replaced with QgsSourceSelect (btw I believe there's
> also an enhancement request in trac for something like that).
>
> QgsSourceSelect would query a selected provider for a list of connections,
> offer to add, edit and remove connections and list vector layers available
> through the selected connection. The available layers can then selected to be
> added to the map.
I have few questions:
Have you thought about the layer creation? should it be included in provider?
How will we access the new functionality in the provider? do the interface needs to be extended?
Regards
Godofredo Contreras
_________________________________________________________________
Spell a grand slam in this game where word skill meets World Series. Get in the game.
http://club.live.com/word_slugger.aspx?icid=word_slugger_wlhm_admod_april08
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080422/f18b49b0/attachment-0001.html
More information about the Qgis-developer
mailing list