Repository navigation
Refuse a resampling gdalcubes would read as near (#96) - #98
Merged
NewGraphEnvironment merged 5 commits intoOct 1, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
gdalcubes::cube_view() reads an unknown resampling as "near" with no error, so a typo returned and cached a nearest-neighbour cube. resampling_check() admits only the twelve values measured to survive the cube_view() round trip, refuses the honoured aliases mean/median with the spelling to use, and runs at the three entry points and both cube_view() call sites. aggregation_check() and resampling_check() share one helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
NewGraphEnvironment
deleted the
96-resampling-typo-silently-becomes-near-in
branch
October 1, 2026 15:21
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.
Summary
dft_stac_cube(),dft_stac_composite()anddft_stac_fetch()now refuse aresamplingthatgdalcubes::cube_view()would silently read as"near". Before,resampling = "bilinaer"returned and cached a nearest-neighbour cube with no warning. Fixes resampling typo silently becomes "near" in dft_stac_cube / dft_stac_composite / dft_stac_fetch #96, the same mechanism dft_stac_composite(aggregation = "count") silently returns reflectance, not a clear-observation count #92 fixed foraggregation.cube_view()$resamplingon gdalcubes 0.7.5, rather than taken from the docs. Twelve come back unchanged:near bilinear cubic cubicspline lanczos average mode max min med q1 q3.meanandmedianare honoured but renamed, toaverageandmed. They are refused, and the error names the spelling to use.near, including GDAL's ownsum,rmsandgauss.cube_view()call sites (stac_cube_assemble(),fetch_extent_to()).fetch_extent_to()also gains the dft_stac_composite(aggregation = "count") silently returns reflectance, not a clear-observation count #92aggregation_check()it lacked. Both checks share one helper,cube_view_choice_check().mean/medianbreaks calls that used to give correct output.Related Issues
Test plan
devtools::test(): FAIL 0 | PASS 1508 | SKIP 16cube_view()unchanged,bilinaercomes backnear, and the aliases come back as their canonical names/code-check: round 1 found one vacuous assertion ("near"also matched the allowed set printed in the headline), now fixed. Rounds 2 and 3 were clean, and a docs fact-check round was cleandevtools::document()and lintr clean on the touched filesNotes
dft_cache_clear()reclaims them. NEWS says so.🤖 Generated with Claude Code
https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN