uber / h3-go

Go bindings for H3, a hierarchical hexagonal geospatial indexing system
https://uber.github.io/h3/
Apache License 2.0
317 stars 60 forks source link

Adding CellsToMultiPolygon #70

Closed zachcoleman closed 3 months ago

zachcoleman commented 3 months ago

Took a slightly different approach with this to build up a slice of GeoPolygons instead of a linked list. This felt more idiomatic to Go.

zachcoleman commented 3 months ago

Curious what the thoughts are on repeat cells. The C API states in documentation "It is expected that all hexagons in the set have the same resolution and that the set contains no duplicates. Behavior is undefined if duplicates or multiple resolutions are present, and the algorithm may produce unexpected or invalid output."

We can check against this and/or deduplicate cells as well, but I have just added the caveat to the docstring for now.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 10340944716

Details


Totals Coverage Status
Change from base Build 4495800687: 0.6%
Covered Lines: 529
Relevant Lines: 552

💛 - Coveralls