Fix --build-overviews: add missing space in gdaladdo arguments - #2059
Merged
smathermather merged 1 commit intoAug 4, 2026
Merged
Conversation
Adjacent string literals are concatenated at compile time, so the missing
trailing space after YCBCR made gdaladdo receive the orthophoto path as the
value of --config PHOTOMETRIC_OVERVIEW:
... --config PHOTOMETRIC_OVERVIEW YCBCR/path/to/odm_orthophoto.tif 2 4 8 16
gdaladdo then treats "2" as its input raster and exits non-zero, which
system.run turns into a SubprocessException, aborting the run at the
odm_orthophoto stage.
Introduced in OpenDroneMap#1935; affects 3.6.0 and 3.6.1.
Fixes OpenDroneMap#2058
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a missing trailing space to one string literal in
build_overviews().Problem
Python concatenates adjacent string literals at compile time, so the command built in
opendm/orthophoto.pycame out as:The orthophoto path is consumed as the value of
--config PHOTOMETRIC_OVERVIEW, leaving2as the first positional argument — sogdaladdotries to open2as its input raster and exits non-zero.system.runraisesSubprocessException, and the run aborts at theodm_orthophotostage rather than degrading.The preceding
INTERLEAVE_OVERVIEW PIXELline already has its trailing space; only thePHOTOMETRIC_OVERVIEWline was missing one.Affected
Introduced by #1935 ("Add interleave=pixel and photometric=ycbcr for orthophoto overviews by default"). Affects 3.6.0, 3.6.1, and master; 3.5.6 predates the
PHOTOMETRIC_OVERVIEWline and is unaffected.Triggered by any georeferenced reconstruction that reaches
post_orthophoto_stepswith--build-overviewsand without--cog. The failure lands at the end of the pipeline, after SfM and MVS have completed.Verification
Extracted the concatenated template from
build_overviews()and formatted it with a sample path, before and after:I have not run a full pipeline against this branch — the check above covers the argument construction, which is the whole of the defect.
Notes
Reported as #2058, which was closed automatically by the triage bot shortly after it was opened; it has not been fixed on master.
Kept deliberately to one character. If it would be useful, a follow-up could build the
gdaladdoarguments as a list and' '.join(...)them, which would make the separator structural rather than a matter of remembering the trailing space — happy to open that separately if you want it.🤖 Generated with Claude Code