Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 207
    • Issues 207
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !602

Fix OutputVectorDataParameter inside a choice

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Cédric Traizet requested to merge bug_param_choice_vectordata into release-7.0 Oct 07, 2019
  • Overview 1
  • Commits 1
  • Pipelines 2
  • Changes 1

Summary

This MR is a fix for this bug reported on the forum.

Rationale

This is a bug in the application engine, it affects the ZonalStatistics application, and maybe others.

if a vector data parameteris the child of a choice parameter, and if the choice is non actives (i.e. non chosen) while the vector data is, the Application class will try to create the output vector data, leading to a crash. It can be reproduced with the command:

otbcli_ZonalStatistics  -in S2A_ROI.tif -inzone.vector.in ImageClassifier/input/classif_train.shp -out raster -out.vector.filename /tmp/out.shp -out.raster.filename /tmp/out.tif

It happens on Monteverdi because a default value is attributed to vector data parameters, activating them.

The fix simply use the recurse functionality of the IsEnabled(string paramKey) of the Application engine to check if the choice is active before attempting to create the output data.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Edited Oct 07, 2019 by Cédric Traizet
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bug_param_choice_vectordata