Skip to content
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

Feat : Cells to multipolygon #64

Closed
wants to merge 5 commits into from

Conversation

SoulPancake
Copy link

Tried adding my implementation for cellsToMultipolygon which was marked as TODO

@CLAassistant
Copy link

CLAassistant commented Jan 6, 2024

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Jan 16, 2024

Pull Request Test Coverage Report for Build 7499665938

  • 21 of 21 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 95.772%

Totals Coverage Status
Change from base Build 4495800687: 0.5%
Covered Lines: 521
Relevant Lines: 544

💛 - Coveralls

@@ -98,8 +98,10 @@ type (
}

// LinkedGeoPolygon is a linked-list of GeoPolygons.
// TODO: not implemented.
LinkedGeoPolygon struct{}
LinkedGeoPolygon struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In uber/h3, this seems to be doubly-linked: https://github.com/uber/h3/blob/138a7487adb0892715ea7ced785db4e9c38842d1/src/h3lib/include/h3api.h.in#L179

Does that need to be maintained here?

func CellsToMultiPolygon(cells []Cell) *LinkedGeoPolygon {
panic("not implemented")
var head, current *LinkedGeoPolygon
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd expect this function to wrap cellsToMultiPolygon from the C core library, which handles details like ensuring duplicated internal vertices are not included. https://github.com/uber/h3/blob/138a7487adb0892715ea7ced785db4e9c38842d1/src/h3lib/include/h3api.h.in#L293

@zachcoleman
Copy link
Collaborator

This was implemented in #70

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.

5 participants