Fix tile rendering#1234
Open
clarasb wants to merge 5 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
- Coverage 89.61% 89.60% -0.01%
==========================================
Files 280 280
Lines 21694 21700 +6
==========================================
+ Hits 19440 19444 +4
- Misses 2254 2256 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TonioF
reviewed
Jul 16, 2026
TonioF
left a comment
Contributor
There was a problem hiding this comment.
Just one comment, otherwise it looks good to me.
| ### Fixes | ||
| * Improved raster tile alignment by using nearest-pixel rounding during tile reprojection, | ||
| reducing visual offsets between rendered map tiles and dataset coordinates. (#1216) | ||
| reducing visual offsets between rendered map tiles and dataset coordinates. (#1216, #1234) |
Contributor
There was a problem hiding this comment.
Suggested change
| reducing visual offsets between rendered map tiles and dataset coordinates. (#1216, #1234) | |
| Reducing visual offsets between rendered map tiles and dataset coordinates. (#1216, #1234) |
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.
This PR is a follow-up to #1216.
#1216 improved the tile indexing step by using nearest-pixel rounding when mapping tile pixels to dataset pixels. This fixed the actual tile shift, because target pixels are now sampled from the nearest source pixel instead of being consistently biased toward one side.
However, the source subset used for rendering was still computed too tightly. The subset bbox describes the transformed positions of the target tile pixel centers, but nearest-pixel rounding may select a source pixel whose center lies just outside that bbox.
If such an edge source pixel was not included in the loaded subset, it was treated as invalid and rendered as missing or transparent data. This PR fixes this behaviour by enlarging the source subset now using the dataset’s own pixel size, including the half-pixel margin required by nearest-pixel rounding.
Example:
xcube serve -vvv -c examples/serve/panels-demo/config.yamlChecklist:
Add docstrings and API docs for any new/modified user-facing classes and functionsNew/modified features documented indocs/source/*CHANGES.md