Skip to content
Permalink
Browse files

fixes bugs about processing evolution

  • Loading branch information
amondot committed Jan 31, 2014
1 parent 4f443dd commit 7abca16d05a26432b3151eb259c0f8576a9755c8
@@ -1,5 +1,5 @@
FILE(GLOB PY_FILES *.py)
FILE(GLOB DESCR_FILES description/*.txt)
FILE(GLOB DESCR_FILES description/*.xml)
FILE(GLOB HELPER_FILES helper/*.py)
FiLE(GLOB HELP_FILES description/doc/*.html)

@@ -40,12 +40,12 @@
from processing.parameters.ParameterSelection import ParameterSelection
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingUtils import ProcessingUtils
from processing.core.WrongHelpFileException import WrongHelpFileException
from processing.parameters.ParameterFactory import ParameterFactory
from processing.outputs.OutputFactory import OutputFactory
from processing.otb.OTBUtils import OTBUtils
from processing.parameters.ParameterExtent import ParameterExtent
from processing.tools.system import *
import xml.etree.ElementTree as ET
import traceback
import inspect
@@ -250,15 +250,15 @@ def processAlgorithm(self, progress):
if isinstance(param, ParameterVector):
commands.append(param.name)
if self.hasROI:
roiFile = ProcessingUtils.getTempFilename('shp')
roiFile = getTempFilename('shp')
commands.append(roiFile)
self.roiVectors[param.value] = roiFile
else:
commands.append("\"" + param.value+ "\"")
elif isinstance(param, ParameterRaster):
commands.append(param.name)
if self.hasROI:
roiFile = ProcessingUtils.getTempFilename('tif')
roiFile = getTempFilename('tif')
commands.append(roiFile)
self.roiRasters[param.value] = roiFile
else:
@@ -34,11 +34,10 @@
import subprocess
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingUtils import ProcessingUtils
from processing.tools.system import *
import logging
import xml.etree.ElementTree as ET
import traceback
from processing.core.QGisLayers import QGisLayers
import qgis.core
import PyQt4.QtGui

@@ -56,15 +55,15 @@ def otbPath():
if folder == None:
folder = ""
#try to configure the path automatically
if ProcessingUtils.isMac():
if isMac():
testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")
if os.path.exists(os.path.join(testfolder, "otbcli")):
folder = testfolder
else:
testfolder = "/usr/local/bin"
if os.path.exists(os.path.join(testfolder, "otbcli")):
folder = testfolder
elif ProcessingUtils.isWindows():
elif isWindows():
testfolder = os.path.dirname(str(QgsApplication.prefixPath()))
testfolder = os.path.dirname(testfolder)
testfolder = os.path.join(testfolder, "bin")
@@ -83,15 +82,15 @@ def otbLibPath():
if folder == None:
folder =""
#try to configure the path automatically
if ProcessingUtils.isMac():
if isMac():
testfolder = os.path.join(str(QgsApplication.prefixPath()), "lib/otb/applications")
if os.path.exists(testfolder):
folder = testfolder
else:
testfolder = "/usr/local/lib/otb/applications"
if os.path.exists(testfolder):
folder = testfolder
elif ProcessingUtils.isWindows():
elif isWindows():
testfolder = os.path.dirname(str(QgsApplication.prefixPath()))
testfolder = os.path.join(testfolder, "orfeotoolbox")
testfolder = os.path.join(testfolder, "applications")

This file was deleted.

0 comments on commit 7abca16

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