Skip to content
GitLab
Projects Groups 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
    • Contributors
    • Graph
    • Compare
  • Issues 204
    • Issues 204
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • 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
  • !938

Robust extended filename options interpretation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rémi Cresson requested to merge 2312-http_misinterpreted_as_extfilenameopts into develop Oct 05, 2022
  • Overview 3
  • Commits 6
  • Pipelines 5
  • Changes 7

Summary

Closes #2312 (closed)

Rationale

When input file paths are HTTP URIs, like the one we can use with vsicurl, the extended filename options deduction can be a mess. The current implementation only split the filename from the first encountered ? character. This is wrong, since such character can be part of a HTTP request pointing to an online raster file.

Implementation Details

The new implementation consider that the last occurrence of ?& marks the beginning of the extended filename options.

Classes and files
  • ENH: Modules/Core/Common/src/otbExtendedFilenameHelper.cxx (new implementation)
  • REFAC: Modules/IO/ExtendedFilename/src/otbExtendedFilenameToReaderOptions.cxx (shorter code)
  • FIX: some tests contained wrong extended filename pattern (the documentation clearly states the right pattern is Path/Image.ext?&key1=value1&key2=value2).
    • Modules/Adapters/GdalAdapters/test/CMakeLists.txt
    • Modules/IO/ExtendedFilename/test/CMakeLists.txt
    • Modules/IO/ImageIO/test/CMakeLists.txt
    • Modules/Applications/AppSARCalibration/test/CMakeLists.txt
    • Modules/Core/ImageBase/test/CMakeLists.txt

Copyright

The copyright owner is INRAE 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 05, 2022 by Rémi Cresson
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 2312-http_misinterpreted_as_extfilenameopts