Skip to content

Commit

Permalink
[processing] allow geometry types to be specified when defining input…
Browse files Browse the repository at this point in the history
…s in scripts
  • Loading branch information
volaya committed Nov 6, 2013
1 parent e43b8a5 commit c4e39ab
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/plugins/processing/script/ScriptAlgorithm.py
Expand Up @@ -52,7 +52,6 @@
from processing.outputs.OutputFactory import OutputFactory
from processing.script.WrongScriptException import WrongScriptException


class ScriptAlgorithm(GeoAlgorithm):

def __init__(self, descriptionFile, script=None):
Expand Down Expand Up @@ -141,6 +140,15 @@ def processParameterLine(self, line):
elif tokens[1].lower().strip() == 'vector':
param = ParameterVector(tokens[0], desc,
[ParameterVector.VECTOR_TYPE_ANY])
elif tokens[1].lower().strip() == 'vector point':
param = ParameterVector(tokens[0], desc,
[ParameterVector.VECTOR_TYPE_POINT])
elif tokens[1].lower().strip() == 'vector line':
param = ParameterVector(tokens[0], desc,
[ParameterVector.VECTOR_TYPE_LINE])
elif tokens[1].lower().strip() == 'vector polygon':
param = ParameterVector(tokens[0], desc,
[ParameterVector.VECTOR_TYPE_POLYGON])
elif tokens[1].lower().strip() == 'table':
param = ParameterTable(tokens[0], desc, False)
elif tokens[1].lower().strip() == 'multiple raster':
Expand Down

0 comments on commit c4e39ab

Please sign in to comment.