Hi all,

I wonder whether it's possible to specify GDAL driver when creating
QgsVectorLayer instance. The constructor allows passing uri, layer
name and provider. Is there any way how to specify GDAL driver which
will be used for opening datasource (let's say that we are working
with datasource which can be open by two different GDAL drivers).

composedURI = str(dbPath) + "|layername=" + dbTable
layer = QgsVectorLayer(composedURI, layerName, 'ogr')

Something like:

sqliteDriver = ogr.GetDriverByName('SQLite')
sqliteDataSource = sqliteDriver.Open(str(dbPath))

Thanks, Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to