-
Notifications
You must be signed in to change notification settings - Fork 515
Test cellsToLinkedMultiPolygon
for children of pentagon
#916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 8 commits
7a37a85
6eca1ab
dc7b15a
68b8d84
87b7014
b7978f3
c30fb5c
e9a50e7
8aed513
61fc849
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,24 @@ SUITE(cellsToLinkedMultiPolygon) { | |
H3_EXPORT(destroyLinkedMultiPolygon)(&polygon); | ||
} | ||
|
||
TEST(pentagonChldren) { | ||
// children of pentagon 0x80ebfffffffffff | ||
H3Index kids[] = {0x81ea3ffffffffff, 0x81eabffffffffff, | ||
0x81eafffffffffff, 0x81eb3ffffffffff, | ||
0x81eb7ffffffffff, 0x81ebbffffffffff}; | ||
int numCells = ARRAY_SIZE(kids); | ||
Comment on lines
+76
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this happen for any set of res 1 children of a res 0 pentagon? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the notebook here: https://gist.github.com/ajfriend/5594157463b88eb8d4cae35705657d8d At res 1, it only happens for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At res 2, exactly two pentagons of the 12 do not work: |
||
|
||
LinkedGeoPolygon polygon; | ||
t_assertSuccess( | ||
H3_EXPORT(cellsToLinkedMultiPolygon)(kids, numCells, &polygon)); | ||
|
||
// Since these are the children of a cell, we exepect a single loop with | ||
// no holes. | ||
ajfriend marked this conversation as resolved.
Show resolved
Hide resolved
|
||
t_assert(countLinkedLoops(&polygon) == 1, "1 loop added to polygon"); | ||
|
||
H3_EXPORT(destroyLinkedMultiPolygon)(&polygon); | ||
} | ||
|
||
// TODO: This test asserts incorrect behavior - we should be creating | ||
// multiple polygons, each with their own single loop. Update when the | ||
// algorithm is corrected. | ||
|
Uh oh!
There was an error while loading. Please reload this page.