mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
fixes bugs about processing evolution
This commit is contained in:
parent
4f443dd384
commit
7abca16d05
@ -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.ParameterBoolean import ParameterBoolean
|
||||
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,7 +250,7 @@ class OTBAlgorithm(GeoAlgorithm):
|
||||
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:
|
||||
@ -258,7 +258,7 @@ class OTBAlgorithm(GeoAlgorithm):
|
||||
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 @@ from qgis.core import QgsApplication
|
||||
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,7 +55,7 @@ class OTBUtils:
|
||||
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
|
||||
@ -64,7 +63,7 @@ class OTBUtils:
|
||||
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,7 +82,7 @@ class OTBUtils:
|
||||
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
|
||||
@ -91,7 +90,7 @@ class OTBUtils:
|
||||
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")
|
||||
|
@ -1,30 +0,0 @@
|
||||
<root>
|
||||
<key>SplitImage</key>
|
||||
<exec>otbcli_SplitImage</exec>
|
||||
<longname>Split Image</longname>
|
||||
<group>Image Manipulation</group>
|
||||
<description>Split a N multiband image into N images</description>
|
||||
<parameter>
|
||||
<parameter_type source_parameter_type="ParameterType_InputImage">ParameterRaster</parameter_type>
|
||||
<key>in</key>
|
||||
<name>Input Image</name>
|
||||
<description>Input multiband image filename.</description>
|
||||
<optional>False</optional>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<parameter_type source_parameter_type="ParameterType_OutputFilename">OutputFile</parameter_type>
|
||||
<key>out</key>
|
||||
<name>Output Image</name>
|
||||
<description>Output filename that will be used to get the prefix and the extension of the output images to write</description>
|
||||
<hidden />
|
||||
</parameter>
|
||||
<parameter>
|
||||
<parameter_type source_parameter_type="ParameterType_RAM">ParameterNumber</parameter_type>
|
||||
<key>ram</key>
|
||||
<name>Available RAM (Mb)</name>
|
||||
<description>Available memory for processing (in MB)</description>
|
||||
<minValue />
|
||||
<maxValue />
|
||||
<default>128</default>
|
||||
</parameter>
|
||||
</root>
|
Loading…
x
Reference in New Issue
Block a user