Skip to content

Commit 7abca16

Browse files
committed
fixes bugs about processing evolution
1 parent 4f443dd commit 7abca16

File tree

4 files changed

+9
-40
lines changed

4 files changed

+9
-40
lines changed

python/plugins/processing/otb/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FILE(GLOB PY_FILES *.py)
2-
FILE(GLOB DESCR_FILES description/*.txt)
2+
FILE(GLOB DESCR_FILES description/*.xml)
33
FILE(GLOB HELPER_FILES helper/*.py)
44
FiLE(GLOB HELP_FILES description/doc/*.html)
55

python/plugins/processing/otb/OTBAlgorithm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
from processing.parameters.ParameterSelection import ParameterSelection
4141
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
4242
from processing.core.ProcessingLog import ProcessingLog
43-
from processing.core.ProcessingUtils import ProcessingUtils
4443
from processing.core.WrongHelpFileException import WrongHelpFileException
4544
from processing.parameters.ParameterFactory import ParameterFactory
4645
from processing.outputs.OutputFactory import OutputFactory
4746
from processing.otb.OTBUtils import OTBUtils
4847
from processing.parameters.ParameterExtent import ParameterExtent
48+
from processing.tools.system import *
4949
import xml.etree.ElementTree as ET
5050
import traceback
5151
import inspect
@@ -250,15 +250,15 @@ def processAlgorithm(self, progress):
250250
if isinstance(param, ParameterVector):
251251
commands.append(param.name)
252252
if self.hasROI:
253-
roiFile = ProcessingUtils.getTempFilename('shp')
253+
roiFile = getTempFilename('shp')
254254
commands.append(roiFile)
255255
self.roiVectors[param.value] = roiFile
256256
else:
257257
commands.append("\"" + param.value+ "\"")
258258
elif isinstance(param, ParameterRaster):
259259
commands.append(param.name)
260260
if self.hasROI:
261-
roiFile = ProcessingUtils.getTempFilename('tif')
261+
roiFile = getTempFilename('tif')
262262
commands.append(roiFile)
263263
self.roiRasters[param.value] = roiFile
264264
else:

python/plugins/processing/otb/OTBUtils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@
3434
import subprocess
3535
from processing.core.ProcessingConfig import ProcessingConfig
3636
from processing.core.ProcessingLog import ProcessingLog
37-
from processing.core.ProcessingUtils import ProcessingUtils
37+
from processing.tools.system import *
3838
import logging
3939
import xml.etree.ElementTree as ET
4040
import traceback
41-
from processing.core.QGisLayers import QGisLayers
4241
import qgis.core
4342
import PyQt4.QtGui
4443

@@ -56,15 +55,15 @@ def otbPath():
5655
if folder == None:
5756
folder = ""
5857
#try to configure the path automatically
59-
if ProcessingUtils.isMac():
58+
if isMac():
6059
testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")
6160
if os.path.exists(os.path.join(testfolder, "otbcli")):
6261
folder = testfolder
6362
else:
6463
testfolder = "/usr/local/bin"
6564
if os.path.exists(os.path.join(testfolder, "otbcli")):
6665
folder = testfolder
67-
elif ProcessingUtils.isWindows():
66+
elif isWindows():
6867
testfolder = os.path.dirname(str(QgsApplication.prefixPath()))
6968
testfolder = os.path.dirname(testfolder)
7069
testfolder = os.path.join(testfolder, "bin")
@@ -83,15 +82,15 @@ def otbLibPath():
8382
if folder == None:
8483
folder =""
8584
#try to configure the path automatically
86-
if ProcessingUtils.isMac():
85+
if isMac():
8786
testfolder = os.path.join(str(QgsApplication.prefixPath()), "lib/otb/applications")
8887
if os.path.exists(testfolder):
8988
folder = testfolder
9089
else:
9190
testfolder = "/usr/local/lib/otb/applications"
9291
if os.path.exists(testfolder):
9392
folder = testfolder
94-
elif ProcessingUtils.isWindows():
93+
elif isWindows():
9594
testfolder = os.path.dirname(str(QgsApplication.prefixPath()))
9695
testfolder = os.path.join(testfolder, "orfeotoolbox")
9796
testfolder = os.path.join(testfolder, "applications")

python/plugins/processing/otb/description/SplitImage.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)