Skip to content

Commit c4e39ab

Browse files
committedNov 6, 2013
[processing] allow geometry types to be specified when defining inputs in scripts
1 parent e43b8a5 commit c4e39ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎python/plugins/processing/script/ScriptAlgorithm.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from processing.outputs.OutputFactory import OutputFactory
5353
from processing.script.WrongScriptException import WrongScriptException
5454

55-
5655
class ScriptAlgorithm(GeoAlgorithm):
5756

5857
def __init__(self, descriptionFile, script=None):
@@ -141,6 +140,15 @@ def processParameterLine(self, line):
141140
elif tokens[1].lower().strip() == 'vector':
142141
param = ParameterVector(tokens[0], desc,
143142
[ParameterVector.VECTOR_TYPE_ANY])
143+
elif tokens[1].lower().strip() == 'vector point':
144+
param = ParameterVector(tokens[0], desc,
145+
[ParameterVector.VECTOR_TYPE_POINT])
146+
elif tokens[1].lower().strip() == 'vector line':
147+
param = ParameterVector(tokens[0], desc,
148+
[ParameterVector.VECTOR_TYPE_LINE])
149+
elif tokens[1].lower().strip() == 'vector polygon':
150+
param = ParameterVector(tokens[0], desc,
151+
[ParameterVector.VECTOR_TYPE_POLYGON])
144152
elif tokens[1].lower().strip() == 'table':
145153
param = ParameterTable(tokens[0], desc, False)
146154
elif tokens[1].lower().strip() == 'multiple raster':

0 commit comments

Comments
 (0)
Please sign in to comment.