Skip to content

Commit

Permalink
[processing] support OTB 5.8.0
Browse files Browse the repository at this point in the history
(cherry picked from commit 3145a01)
  • Loading branch information
alexbruy committed May 24, 2017
1 parent 2ea211d commit 2822e39
Show file tree
Hide file tree
Showing 286 changed files with 13,122 additions and 3 deletions.
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/otb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ FiLE(GLOB HELP_FILES description/5.0.0/doc/*.html)
FILE(GLOB DESCR_FILES description/5.6.0/*.xml)
FiLE(GLOB HELP_FILES description/5.6.0/doc/*.html)

FILE(GLOB DESCR_FILES description/5.8.0/*.xml)
FiLE(GLOB HELP_FILES description/5.8.0/doc/*.html)

PLUGIN_INSTALL(processing ./algs/otb ${PY_FILES})
PLUGIN_INSTALL(processing ./algs/otb/helper ${HELPER_FILES})

Expand All @@ -14,3 +17,6 @@ PLUGIN_INSTALL(processing ./algs/otb/description/5.0.0/doc ${HELP_FILES})

PLUGIN_INSTALL(processing ./algs/otb/description/5.6.0 ${DESCR_FILES})
PLUGIN_INSTALL(processing ./algs/otb/description/5.6.0/doc ${HELP_FILES})

PLUGIN_INSTALL(processing ./algs/otb/description/5.8.0 ${DESCR_FILES})
PLUGIN_INSTALL(processing ./algs/otb/description/5.8.0/doc ${HELP_FILES})
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/otb/OTBUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ def getInstalledVersion(runOtb=False):


def compatibleDescriptionPath(version):
supportedVersions = {"5.0.0": "5.0.0", "5.4.0": "5.4.0", "5.6.0": "5.6.0"}
supportedVersions = {"5.0.0": "5.0.0",
"5.4.0": "5.4.0",
"5.6.0": "5.6.0",
"5.8.0": "5.8.0"}
if version is None:
return None
if version not in supportedVersions:
Expand Down
42 changes: 42 additions & 0 deletions python/plugins/processing/algs/otb/description/5.8.0/BandMath.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<root>
<key>BandMath</key>
<exec>otbcli_BandMath</exec>
<longname>Band Math</longname>
<group>Miscellaneous</group>
<description>Perform a mathematical operation on monoband images</description>
<parameter>
<parameter_type source_parameter_type="ParameterType_InputImageList">ParameterMultipleInput</parameter_type>
<key>il</key>
<name>Input image list</name>
<description>Image list to perform computation on.</description>
<datatype />
<optional>False</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_OutputImage">OutputRaster</parameter_type>
<key>out</key>
<name>Output Image</name>
<description>Output image.</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>
<optional>True</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_String">ParameterString</parameter_type>
<key>exp</key>
<name>Expression</name>
<description>The mathematical expression to apply.
Use im1b1 for the first band, im1b2 for the second one...</description>
<default />
<multiline />
<optional>False</optional>
</parameter>
</root>
56 changes: 56 additions & 0 deletions python/plugins/processing/algs/otb/description/5.8.0/BandMathX.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<root>
<key>BandMathX</key>
<exec>otbcli_BandMathX</exec>
<longname>Band Math X</longname>
<group>Miscellaneous</group>
<description>This application performs mathematical operations on multiband images.
Mathematical formula interpretation is done via muParserX library : http://articles.beltoforion.de/article.php?a=muparserx</description>
<parameter>
<parameter_type source_parameter_type="ParameterType_InputImageList">ParameterMultipleInput</parameter_type>
<key>il</key>
<name>Input image list</name>
<description>Image list to perform computation on.</description>
<datatype />
<optional>False</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_OutputImage">OutputRaster</parameter_type>
<key>out</key>
<name>Output Image</name>
<description>Output image.</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>
<optional>True</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_String">ParameterString</parameter_type>
<key>exp</key>
<name>Expressions</name>
<description>Mathematical expression to apply.</description>
<default />
<multiline />
<optional>False</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_InputFilename">ParameterFile</parameter_type>
<key>incontext</key>
<name>Import context</name>
<description>A txt file containing user's constants and expressions.</description>
<isFolder />
<optional>True</optional>
</parameter>
<parameter>
<parameter_type source_parameter_type="ParameterType_OutputFilename">OutputFile</parameter_type>
<key>outcontext</key>
<name>Export context</name>
<description>A txt file where to save user's constants and expressions.</description>
</parameter>
</root>
<
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<root>
<key>BinaryMorphologicalOperation-closing</key>
<exec>otbcli_BinaryMorphologicalOperation</exec>
<longname>BinaryMorphologicalOperation (closing)</longname>
<group>Feature Extraction</group>
<description>Performs morphological operations on an input image channel</description>
<parameter>
<parameter_type source_parameter_type="ParameterType_InputImage">ParameterRaster</parameter_type>
<key>in</key>
<name>Input Image</name>