Repository navigation
Fix image rendering for tiles with negative indices (e.g. X0084_Y-013) - #12
Merged
Merged
Conversation
FORCE zero-pads tile indices to 4 characters including the sign, so a negative index has 3 digits (-013). The tile-name regex required 4 digits after the minus, rejecting these tiles and leaving the image unrendered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HUYE7hae8nSVArW4MDodWh
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.
Problem
Clicking a point in a tile with a negative index, e.g.
X0084_Y-013, did not render the image.FORCE zero-pads tile indices to 4 characters including the sign (
f"{-13:04d}" == "-013", whichutils.locatealso uses), so a negative index has only 3 digits.TILE_NAMEinforcelive/overlay.pyrequired 4 digits after the minus (-?\d{4}), socheck_tilerejected these tiles with "Invalid tile name" and the overlay request failed.Fix
TILE_NAMEnow accepts\d{4,}or-\d{3,}for each axis. It still rejects path-like or malformed names.test_check_tile_negative_index, which covers valid negative and positive names and malformed or traversal names.All 30 tests pass.
Generated by Claude Code