Skip to content

Feat : Cells to multipolygon#64

Closed
SoulPancake wants to merge 5 commits intouber:masterfrom
SoulPancake:ab/h3/cells-multipolygon
Closed

Feat : Cells to multipolygon#64
SoulPancake wants to merge 5 commits intouber:masterfrom
SoulPancake:ab/h3/cells-multipolygon

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

// 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