Skip to content
Permalink
Browse files

[processing] add more possible data providers for input vector layers

  • Loading branch information
mhugo committed Jan 8, 2016
1 parent 716664e commit 83a24a3794d5573d5a0b9cad679bfa503378ba84
Showing with 7 additions and 12 deletions.
  1. +7 −12 python/plugins/processing/tools/dataobjects.py
@@ -248,18 +248,13 @@ def getObjectFromUri(uri, forceLoad=True):
settings.setValue('/Projections/defaultBehaviour', '')

# If is not opened, we open it
layer = QgsVectorLayer(uri, uri, 'ogr')
if layer.isValid():
if prjSetting:
settings.setValue('/Projections/defaultBehaviour', prjSetting)
_loadedLayers[normalizeLayerSource(layer.source())] = layer
return layer
layer = QgsVectorLayer(uri, uri, 'postgres')
if layer.isValid():
if prjSetting:
settings.setValue('/Projections/defaultBehaviour', prjSetting)
_loadedLayers[normalizeLayerSource(layer.source())] = layer
return layer
for provider in ['ogr', 'postgres', 'spatialite', 'virtual']:
layer = QgsVectorLayer(uri, uri, provider)
if layer.isValid():
if prjSetting:
settings.setValue('/Projections/defaultBehaviour', prjSetting)
_loadedLayers[normalizeLayerSource(layer.source())] = layer
return layer
layer = QgsRasterLayer(uri, uri)
if layer.isValid():
if prjSetting:

0 comments on commit 83a24a3

Please sign in to comment.
You can’t perform that action at this time.