feat: add pure-Go CellToLatLng & CellToBoundary to x/h3go#125
Merged
Conversation
Implement the reverse projection pipeline in pure Go: CellToLatLng (+ Cell.LatLng) and CellToBoundary (+ Cell.Boundary), with the supporting FaceIJK/coordIJK/vec2d/vec3d geometry, substrate grids, and overage adjustment. Verified against the cgo reference via paritytest and by LatLngToCell round-trips, with regression cases ported from the C tests. Refactors applied across the package: - Convert input-parameter helpers to methods on their natural receiver type, with one canonical receiver name per type. - Inline pure-delegation unexported helpers into their exported methods (resolution, baseCellNumber, isPentagon); collapse isValid's guard in. - Add isResClassIII(res) helper, replacing scattered %2 == 1 checks. - Exclude mnd for x/h3go via path-scoped .golangci.yml rule (geometric and bit-layout constants are inherent, not magic) and drop the now-unused //nolint:mnd directives; keep gosec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
71f76d9 to
843f012
Compare
Coverage Report for CI Build 27647386888Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
jogly
approved these changes
Jun 29, 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.
Implement the reverse projection pipeline in pure Go: CellToLatLng (+ Cell.LatLng) and CellToBoundary (+ Cell.Boundary), with the supporting FaceIJK/coordIJK/vec2d/vec3d geometry, substrate grids, and overage adjustment. Verified against the cgo reference via paritytest and by LatLngToCell round-trips, with regression cases ported from the C tests.
Refactors applied across the package: