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 b233349 commit 2f49f6a9aeaddd78bd0bc1005e465e4878715a04
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.outputs import OutputTable
from processing.core.outputs import OutputVector
@@ -199,6 +200,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() == 'file':
param = ParameterFile(tokens[0], desc, False)
elif tokens[1].lower().strip() == 'folder':
@@ -347,6 +350,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 2f49f6a

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