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