8000 Replace cellsToLinkedMultiPolygon backend with cellsToMultiPolygon by ajfriend · Pull Request #1136 · uber/h3 · GitHub
[go: up one dir, main page]

Skip to content

Replace cellsToLinkedMultiPolygon backend with cellsToMultiPolygon - #1136

Merged
ajfriend merged 12 commits into
uber:masterfrom
ajfriend:aj/replace_cell_to_poly
Mar 17, 2026
Merged

ajfriend merged 12 commits into
uber:masterfrom
ajfriend:aj/replace_cell_to_poly

Conversation

@ajfriend
@ajfriend ajfriend commented Mar 5, 2026 •
Copy link
Copy Markdown
Collaborator

Changes

Notes

  • Changes should have full line and branch coverage. Overall % coverage goes down only because we deleted a bunch of files

Discussion

We should discuss the new invalid input behavior. We now raise errors instead of having undefined behavior on invalid, duplicate, or mixed resolution cells. Alternatively, we might automatically de-dupe for the user without raising an error, for example.

I'm in favor of the strict behavior; it helped us find one bug in the CLI recently with #1124.

Note that we can start strict and relax later without making a breaking API change. Relaxing an error into a success is backwards-compatible, but adding a new error to previously-accepted input is not. So strict is the safer starting point.

All that being said, it might be prudent to hold off on finalizing these APIs and releasing a new version until we implement uncompactCellsToMultiPolygon and #1114. Since we'll have a few functions with different expectations on inputs, it would be helpful to have them all in hand at once to figure out what the APIs should look like, and hopefully make them intelligible to end users.

@coveralls
coveralls commented Mar 5, 2026 •
Copy link
Copy Markdown

Coverage Status

coverage: 99.066% (-0.03%) from 99.095%
when pulling f5520bf on ajfriend:aj/replace_cell_to_poly
into 1d5346b on uber:master.

@ajfriend ajfriend changed the title [WIP] Replace cellsToLinkedMultiPolygon backend with cellsToMultiPolygon Replace cellsToLinkedMultiPolygon backend with cellsToMultiPolygon Mar 6, 2026
Comment thread CHANGELOG.md Resolved
@justinhwang justinhwang left a comment
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!

@ajfriend
ajfriend merged commit 9477d65 into uber:master Mar 17, 2026
47 checks passed
@ajfriend
ajfriend deleted the aj/replace_cell_to_poly branch March 17, 2026 19:00
justinhwang added a commit that referenced this pull request Nov 16, 2026
… 1 cell (#1305)

The children of a cell always form a single polygon with no holes. Assert
that for the res 1 children of every res 0 cell, the res 2 children of
every res 1 cell, and the res 2 descendants of every res 0 cell.

This is a regression test for #917. The vertex graph backend removed in
#1136 matched shared vertexes by hashing their floating point coordinates,
and produced extra loops or polygons for the children of some pentagons
and hexagons.
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.

4 participants

0