Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qgis-otb-plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Catherine CALME
qgis-otb-plugin
Commits
904c3b13
Commit
904c3b13
authored
May 16, 2018
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix version file parsing (not saved in config)
parent
24be1f26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
otb/OTBAlgorithmProvider.py
otb/OTBAlgorithmProvider.py
+6
-4
No files found.
otb/OTBAlgorithmProvider.py
View file @
904c3b13
...
...
@@ -81,6 +81,8 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
for
otb_app
in
os
.
listdir
(
app_dir
):
if
not
otb_app
.
startswith
(
'otbapp_'
):
continue
if
otb_app
in
[
'TestApplication'
,
'ApplicationExample'
]:
continue
app_name
=
os
.
path
.
basename
(
otb_app
).
split
(
'.'
)[
0
][
7
:]
dfile
=
os
.
path
.
join
(
descr_folder
,
app_name
+
'.txt'
)
isValid
=
True
...
...
@@ -108,9 +110,9 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
raise
ValueError
(
self
.
tr
(
"Cannot find '{}'. OTB will be disabled"
.
format
(
os
.
path
.
join
(
v
,
'bin'
,
'otbApplicationLauncherCommandLine'
))))
# install_dir #otb issue 1557
version_file
=
os
.
path
.
join
(
v
,
'share'
,
'doc'
,
'OTB-6.
5
'
,
'VERSION'
)
version_file
=
os
.
path
.
join
(
v
,
'share'
,
'doc'
,
'OTB-6.
6
'
,
'VERSION'
)
# build_dir
if
os
.
path
.
isfile
(
version_file
):
if
not
os
.
path
.
isfile
(
version_file
):
version_file
=
os
.
path
.
join
(
v
,
'VERSION'
)
if
os
.
path
.
isfile
(
version_file
):
with
open
(
version_file
)
as
vf
:
...
...
@@ -118,8 +120,8 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
vlines
=
[
l
.
strip
()
for
l
in
vlines
]
vline
=
vlines
[
0
]
if
'OTB Version:'
in
vline
:
self
.
version
=
vline
.
split
(
':'
)[
1
]
ProcessingConfig
.
setSettingValue
(
OTBUtils
.
VERSION
,
self
.
version
)
self
.
version
=
vline
.
split
(
':'
)[
1
]
.
strip
()
#
ProcessingConfig.setSettingValue(OTBUtils.VERSION, self.version)
env_profile
=
os
.
path
.
join
(
v
,
'otbenv.profile'
)
if
os
.
path
.
isfile
(
env_profile
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment