Skip to content
Permalink
Browse files

[processing] patch for issues with delimited text layers

Still won't work when using delimited text layers in parameters of type MultipleInput
  • Loading branch information
volaya committed Nov 21, 2014
1 parent 1f47ffe commit 9f8a742352c355681c32f1ec5fe25d127bfe3017
Showing with 11 additions and 6 deletions.
  1. +8 −2 python/plugins/processing/core/GeoAlgorithm.py
  2. +3 −4 python/plugins/processing/tools/dataobjects.py
@@ -350,7 +350,10 @@ def setOutputCRS(self):
if isinstance(param, (ParameterRaster, ParameterVector,
ParameterMultipleInput)):
if param.value:
inputlayers = param.value.split(';')
if isinstance(param, ParameterMultipleInput):
inputlayers = param.value.split(';')
else:
inputlayers = [param.value]
for inputlayer in inputlayers:
for layer in layers:
if layer.source() == inputlayer:
@@ -377,7 +380,10 @@ def checkInputCRS(self):
if isinstance(param, (ParameterRaster, ParameterVector,
ParameterMultipleInput)):
if param.value:
layers = param.value.split(';')
if isinstance(param, ParameterMultipleInput):
layers = param.value.split(';')
else:
layers = [param.value]
for item in layers:
crs = dataobjects.getObject(item).crs()
if crs not in crsList:
@@ -89,10 +89,9 @@ def getVectorLayers(shapetype=[-1], sorting=True):
for layer in layers:
mapLayer = layer.layer()
if mapLayer.type() == QgsMapLayer.VectorLayer:
if shapetype == ALL_TYPES or mapLayer.geometryType() in shapetype:
uri = unicode(mapLayer.source())
if not uri.lower().endswith('csv') and not uri.lower().endswith('dbf'):
vector.append(mapLayer)
if (mapLayer.hasGeometryType() and
(shapetype == ALL_TYPES or mapLayer.geometryType() in shapetype)):
vector.append(mapLayer)
if sorting:
return sorted(vector, key=lambda layer: layer.name().lower())
else:

0 comments on commit 9f8a742

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