fix: tile generator logic MAPCO-10634#90
Merged
Conversation
…related tests Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…and adjust related tests Co-authored-by: Copilot <copilot@github.com>
…e tile range handling Co-authored-by: Copilot <copilot@github.com>
|
🎫 Related Jira Issue: MAPCO-10634 |
vitaligi
requested changes
May 17, 2026
Contributor
vitaligi
left a comment
There was a problem hiding this comment.
i will go through the rest of changes later
…date related tests
vitaligi
requested changes
May 18, 2026
Co-authored-by: Copilot <copilot@github.com>
vitaligi
requested changes
May 18, 2026
…date related tests Co-authored-by: Copilot <copilot@github.com>
vitaligi
approved these changes
May 18, 2026
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 pull request makes significant changes to how tile ranges are defined and processed, shifting from half-open intervals (where
maxX/maxYwere exclusive) to fully closed intervals (wheremaxX/maxYare inclusive). This affects all core tile range logic, including calculations, batching, iteration, and tests, ensuring more intuitive and correct handling of single-tile ranges and tile counts.Core logic and API changes:
All tile range definitions (
minX,maxX,minY,maxY) are now inclusive, meaning both endpoints are included in the range. This affects the implementation ofbboxToTileRange,TileRanger.tileToRange, and all code that iterates over or splits ranges. [1] [2] [3] [4] [5] [6] [7]The tile count calculation in
tileRangeToTilesCountis updated to account for inclusive ranges, fixing off-by-one errors.Test updates and validation:
These changes standardize the handling of tile ranges across the codebase, making the logic more consistent and less error-prone, especially for edge cases involving single-tile and boundary-inclusive ranges.