Skip to content

PIPELINE-4286: Floor coordinates when building gridcode - #99

Merged
andres-arana merged 2 commits into
mainfrom
PIPELINE-4286-floor-coordinates-in-gridcode
Jul 3, 2026
Merged

andres-arana merged 2 commits into
mainfrom
PIPELINE-4286-floor-coordinates-in-gridcode

Conversation

@andres-arana

@andres-arana andres-arana commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

See https://globalfishingwatch.atlassian.net/browse/PIPELINE-4286

The gridcode was formatted directly from the raw mean_longitude / mean_latitude, so rounding in the %.2f format could push an event into a neighbouring grid cell. This floors each coordinate to the 0.01 grid
resolution before formatting, so the gridcode maps deterministically to its cell.

This is basically the same change we implemented on pipe-measures for this and we definitively need to extract this logic out so we can share it everywhere.

🤖 Generated with Claude Code

The gridcode was formatted directly from the raw mean longitude/latitude,
so rounding in the %.2f format could push an event into a neighbouring
grid cell. Floor each coordinate to the 0.01 grid resolution first so the
gridcode maps deterministically to its cell.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andres-arana andres-arana self-assigned this Jul 3, 2026
@andres-arana
andres-arana merged commit 8583c24 into main Jul 3, 2026
3 checks passed
@andres-arana
andres-arana deleted the PIPELINE-4286-floor-coordinates-in-gridcode branch July 3, 2026 16:43
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