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
8f8632d1
Commit
8f8632d1
authored
Mar 13, 2019
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emtpy string as not None and can break execution
parent
07086604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
otb/OtbAlgorithm.py
otb/OtbAlgorithm.py
+7
-6
No files found.
otb/OtbAlgorithm.py
View file @
8f8632d1
...
...
@@ -205,7 +205,7 @@ class OtbAlgorithm(QgsProcessingAlgorithm):
outputPixelType
=
None
for
k
,
v
in
parameters
.
items
():
# if value is None for a parameter we don't have any businees with this key
if
v
is
None
:
if
not
v
or
v
is
None
:
continue
# for 'outputpixeltype' parameter we find the pixeltype string from self.pixelTypes
if
k
==
'outputpixeltype'
:
...
...
@@ -258,11 +258,12 @@ class OtbAlgorithm(QgsProcessingAlgorithm):
for
out
in
self
.
destinationParameterDefinitions
():
filePath
=
self
.
parameterAsOutputLayer
(
parameters
,
out
.
name
(),
context
)
output_files
[
out
.
name
()]
=
filePath
if
outputPixelType
is
not
None
:
command
+=
' -{} "{}" "{}"'
.
format
(
out
.
name
(),
filePath
,
outputPixelType
)
else
:
command
+=
' -{} "{}"'
.
format
(
out
.
name
(),
filePath
)
if
filePath
:
output_files
[
out
.
name
()]
=
filePath
if
outputPixelType
is
not
None
:
command
+=
' -{} "{}" "{}"'
.
format
(
out
.
name
(),
filePath
,
outputPixelType
)
else
:
command
+=
' -{} "{}"'
.
format
(
out
.
name
(),
filePath
)
OtbUtils
.
executeOtb
(
command
,
feedback
)
...
...
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