Skip to content

Commit

Permalink
[processing] allow to specify geometry type for input vectors in R
Browse files Browse the repository at this point in the history
scripts
  • Loading branch information
alexbruy committed May 21, 2015
1 parent d019e72 commit daee595
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/plugins/processing/algs/r/RAlgorithm.py
Expand Up @@ -156,6 +156,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().startswith('multiple raster'):
Expand Down Expand Up @@ -197,6 +206,9 @@ def processParameterLine(self, line):
elif tokens[1].lower().strip().startswith('string'):
default = tokens[1].strip()[len('string') + 1:]
param = ParameterString(tokens[0], desc, default)
elif tokens[1].lower().strip().startswith('longstring'):
default = tokens[1].strip()[len('longstring') + 1:]
param = ParameterString(tokens[0], desc, default, multiline=True)
elif tokens[1].lower().strip().startswith('output raster'):
out = OutputRaster()
elif tokens[1].lower().strip().startswith('output vector'):
Expand Down

0 comments on commit daee595

Please sign in to comment.