fix: return antimeridian-crossing cells to both edge tiles - #1
Merged
Conversation
A hexagon straddling ±180° has its centroid on one side, so the tile centroid filter returned it to only ONE edge tile; its far half (clipped at 180° in that tile) never rendered, leaving a seam — most visibly on a globe projection. Make the longitude filter antimeridian-aware: also match h3_cell_to_lng ± 360 against the (already buffered) tile bbox, so a crossing cell is returned to BOTH edge tiles. The client (h3j-h3t / mapgl add_h3t_source) normalizes each cell onto the side of the antimeridian the rendered tile sits on, so the halves meet seamlessly. Golden wrap_tile_sql fixtures regenerated; 67 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Hexagons straddling ±180° were returned to only one edge tile (centroid filter), so the far half — clipped at 180° — never rendered (a seam, most visible on a globe). The lng filter is now antimeridian-aware (
h3_cell_to_lng ± 360vs the buffered bbox), returning a crossing cell to both edge tiles; the client (h3j-h3t / mapgladd_h3t_source, walkerke/mapgl#211) normalizes each cell onto the side the rendered tile sits on. Goldenwrap_tile_sqlfixtures regenerated; 67 tests pass. Mirrors MarineSensitivity/server@6aa115f.