@@ -323,7 +323,7 @@ def getImportCommands(self):
323323 else :
324324 commands .append (param .name + ' = ' + 'readGDAL("' + value
325325 + '")' )
326- if isinstance (param , ParameterVector ):
326+ elif isinstance (param , ParameterVector ):
327327 value = param .getSafeExportedLayer ()
328328 value = value .replace ('\\ ' , '/' )
329329 filename = os .path .basename (value )
@@ -334,7 +334,7 @@ def getImportCommands(self):
334334 else :
335335 commands .append (param .name + ' = readOGR("' + folder
336336 + '",layer="' + filename + '")' )
337- if isinstance (param , ParameterTable ):
337+ elif isinstance (param , ParameterTable ):
338338 value = param .value
339339 if not value .lower ().endswith ('csv' ):
340340 raise GeoAlgorithmExecutionException (
@@ -344,6 +344,12 @@ def getImportCommands(self):
344344 else :
345345 commands .append (param .name + ' <- read.csv("' + value
346346 + '", head=TRUE, sep=",")' )
347+ elif isinstance (param , ParameterExtent ):
348+ if param .value :
349+ tokens = unicode (param .value ).split (',' )
350+ commands .append (param .name + ' = extent(' + tokens [0 ] + ',' + tokens [2 ] + ',' + tokens [1 ] + ',' + tokens [3 ] + ')' )
351+ else :
352+ commands .append (param .name + ' = NULL' )
347353 elif isinstance (param , (ParameterTableField , ParameterString ,
348354 ParameterFile )):
349355 commands .append (param .name + '="' + param .value + '"' )
0 commit comments