Skip to content

fix: tile generator logic MAPCO-10634#90

Merged
razbroc merged 7 commits into
masterfrom
fix/tile-generator-logic
May 18, 2026
Merged

fix: tile generator logic MAPCO-10634#90
razbroc merged 7 commits into
masterfrom
fix/tile-generator-logic

Conversation

@razbroc
Copy link
Copy Markdown
Contributor

@razbroc razbroc commented May 17, 2026

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

This pull request makes significant changes to how tile ranges are defined and processed, shifting from half-open intervals (where maxX/maxY were exclusive) to fully closed intervals (where maxX/maxY are 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 of bboxToTileRange, TileRanger.tileToRange, and all code that iterates over or splits ranges. [1] [2] [3] [4] [5] [6] [7]

  • The tile count calculation in tileRangeToTilesCount is 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.

razbroc and others added 4 commits May 16, 2026 23:39
…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>
@razbroc razbroc self-assigned this May 17, 2026
@razbroc razbroc changed the title fix: tile generator logic fix: tile generator logic MAPCO-10634 May 17, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

🎫 Related Jira Issue: MAPCO-10634

Copy link
Copy Markdown
Contributor

@vitaligi vitaligi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will go through the rest of changes later

Comment thread src/geo/bboxUtils.ts
Comment thread src/geo/tiles.ts Outdated
Comment thread src/geo/tilesGenerator.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tileBatcher.ts
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread tests/unit/geo/tileBatcher.spec.ts Outdated
Comment thread tests/unit/geo/tileRanger.spec.ts
Comment thread tests/unit/geo/tileRanger.spec.ts
Comment thread tests/unit/geo/tileRanger.spec.ts
Comment thread tests/unit/geo/tiles.spec.ts Outdated
Co-authored-by: Copilot <copilot@github.com>
@razbroc razbroc requested a review from vitaligi May 18, 2026 11:07
Comment thread tests/unit/geo/tiles.spec.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tileBatcher.ts Outdated
Comment thread src/geo/tiles.ts Outdated
Comment thread tests/unit/geo/tileRanger.spec.ts
…date related tests

Co-authored-by: Copilot <copilot@github.com>
@razbroc razbroc requested a review from vitaligi May 18, 2026 11:47
@razbroc razbroc merged commit 3a29396 into master May 18, 2026
4 checks passed
@razbroc razbroc deleted the fix/tile-generator-logic branch May 18, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants