Skip to content
Permalink
Browse files

[BUGFIX][Processing][Rscript] Use CRS Parameter

Add support for CRS parameter to Rscript command.
  • Loading branch information
rldhont committed May 24, 2016
1 parent 9928980 commit f470c531d8107f78d91da754bfe476e44b2213ab
Showing with 5 additions and 0 deletions.
  1. +5 −0 python/plugins/processing/algs/r/RAlgorithm.py
@@ -43,6 +43,7 @@
from processing.core.parameters import ParameterSelection
from processing.core.parameters import ParameterTableField
from processing.core.parameters import ParameterExtent
from processing.core.parameters import ParameterCrs
from processing.core.parameters import ParameterFile
from processing.core.parameters import ParameterPoint
from processing.core.outputs import OutputTable
@@ -200,6 +201,8 @@ def processParameterLine(self, line):
param = ParameterTableField(tokens[0], tokens[0], field)
elif tokens[1].lower().strip() == 'extent':
param = ParameterExtent(tokens[0], desc)
elif tokens[1].lower().strip() == 'crs':
param = ParameterCrs(tokens[0], desc)
elif tokens[1].lower().strip() == 'point':
param = ParameterPoint(tokens[0], desc)
elif tokens[1].lower().strip() == 'file':
@@ -350,6 +353,8 @@ def getImportCommands(self):
commands.append(param.name + ' = extent(' + tokens[0] + ',' + tokens[2] + ',' + tokens[1] + ',' + tokens[3] + ')')
else:
commands.append(param.name + ' = NULL')
elif isinstance(param, ParameterCrs):
commands.append(param.name + ' = "' + param.value + '"')
elif isinstance(param, (ParameterTableField, ParameterString,
ParameterFile)):
commands.append(param.name + '="' + param.value + '"')

0 comments on commit f470c53

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