mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[BUGFIX][Processing][Rscript] Write output Table
Add support forwriting output table to Rscript command.
This commit is contained in:
parent
9928980851
commit
3b7c0fc04f
@ -278,7 +278,7 @@ class RAlgorithm(GeoAlgorithm):
|
||||
value = value + '.tif'
|
||||
commands.append('writeGDAL(' + out.name + ',"' + value
|
||||
+ '")')
|
||||
if isinstance(out, OutputVector):
|
||||
elif isinstance(out, OutputVector):
|
||||
value = out.value
|
||||
if not value.endswith('shp'):
|
||||
value = value + '.shp'
|
||||
@ -287,6 +287,10 @@ class RAlgorithm(GeoAlgorithm):
|
||||
filename = filename[:-4]
|
||||
commands.append('writeOGR(' + out.name + ',"' + value + '","'
|
||||
+ filename + '", driver="ESRI Shapefile")')
|
||||
elif isinstance(out, OutputTable):
|
||||
value = out.value
|
||||
value = value.replace('\\', '/')
|
||||
commands.append('write.csv(' + out.name + ',"' + value + '"')
|
||||
|
||||
if self.showPlots:
|
||||
commands.append('dev.off()')
|
||||
|
Loading…
x
Reference in New Issue
Block a user