Skip to content
Permalink
Browse files

[processing] allow geometry types to be specified when defining input…

…s in scripts
  • Loading branch information
volaya committed Nov 5, 2013
1 parent e43b8a5 commit c4e39abc36030e71f0630baf8de22b8e9d8d483c
Showing with 9 additions and 1 deletion.
  1. +9 −1 python/plugins/processing/script/ScriptAlgorithm.py
@@ -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):
@@ -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':

0 comments on commit c4e39ab

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