Modifications of the OTB plugin for OTB 7.1 #35298
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The OTB plugin is currently not compatible with OTB 7.1, see #35233, #35237 and the related issue on OTB gitlab.
This pull request updates the downloading link of OTB from version 7.0 in 7.1 in the docker file of QGIS, and fix the following issues :
As OTB now uses gdal 3 and PROJ 6, the environment variable
PROJ_LIB
must be set, like theGDAL_DATA
andGEOTIFF_CSV
variable (the latter is not used in 7.1.0 by the way). The solution is to modify the plugin so that this variable is set before callingotbApplicationLauncherCommandLine
. This is done ingetAuxiliaryDataDirectories
fromotbUtils.py
. This function already setGDAL_DATA
andGEOTIFF_CSV
fromotbenv.profile
.One of the test uses the
Smoothing
application in gaussian mode, which has been refactored in OTB 7.1. The input of the qgis test should be modified :otb_algorithm_tests.yaml:26
type.gaussian.radius: 4.0
->type.gaussian.stdev: 4.0
Note that with this pull request the plugin is still compatible with older version of OTB. However the test would fail with OTB 7.0 because of the change in the Smoothing application input (see above).