Skip to content

Commit c70a0d2

Browse files
committedSep 30, 2013
Merge pull request #915 from gioman/master
Makes SAGA supervised classification work also with SAGA 2.0.8, fixes #8715. Add schema selection to GUI of "Import into PostGIS" tool (fixes #8513). Fixes export of GRASS vectors (fix #8515)
2 parents 814ae4c + 7004a05 commit c70a0d2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed
 

‎python/plugins/processing/admintools/ImportIntoPostGIS.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def defineCharacteristics(self):
9696
self.group = "PostGIS management tools"
9797
self.addParameter(ParameterVector(self.INPUT, "Layer to import"))
9898
self.addParameter(ParameterString(self.DATABASE, "Database (connection name)"))
99+
self.addParameter(ParameterString(self.SCHEMA, "Schema (schema name)"))
99100
self.addParameter(ParameterString(self.TABLENAME, "Table to import to"))
100101
self.addParameter(ParameterBoolean(self.OVERWRITE, "Overwrite", True))
101102
self.addParameter(ParameterBoolean(self.CREATEINDEX, "Create spatial index", True))

‎python/plugins/processing/grass/GrassAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def processAlgorithm(self, progress):
336336

337337
if isinstance(out, OutputVector):
338338
filename = out.value
339-
command = "v.out.ogr -e input=" + out.name + uniqueSufix
339+
command = "v.out.ogr -c -e input=" + out.name + uniqueSufix
340340
command += " dsn=\"" + os.path.dirname(out.value) + "\""
341341
command += " format=ESRI_Shapefile"
342342
command += " olayer=" + os.path.basename(out.value)[:-4]

‎python/plugins/processing/saga/ext/supervisedclassification.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
__revision__ = '$Format:%H$'
2525

2626
from processing.tests.TestData import table
27+
from processing.core.ProcessingConfig import ProcessingConfig
28+
from processing.saga.SagaUtils import SagaUtils
2729

2830
def editCommands(commands):
29-
commands[-3] = commands[-3] + " -STATS " + table()
30-
return commands
31-
32-
31+
saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208)
32+
if not saga208:
33+
commands[-3] = commands[-3] + " -STATS " + table()
34+
return commands
35+
else:
36+
return commands

0 commit comments

Comments
 (0)
Please sign in to comment.