Add `cellsToMultiPolygon` function
This is a tracking issue for sub-issues/PRs related to adding a "cells to polygon" function like:
H3Error cellsToMultiPolygon(const H3Index *cells, const int64_t numCells, GeoMultiPolygon *out);This function should fix #1048, #1049, and #1051, while being faster for large cell sets, and allowing us to handle "global" cell sets that produce polygons that cover a majority (or all) of the globe and/or cross the poles or antimeridian.
Compare this function to cellsToLinkedMultiPolygon, which returns a LinkedGeoPolygon. Once working, my plan would be to reimplement cellsToLinkedMultiPolygon as a light wrapper around cellsToMultiPolygon. Though, I would expect most downstream users would prefer cellsToMultiPolygon since GeoMultiPolygon is easier to work with; for example, we'll be able to remove a bunch of code from h3-py when we no longer have to walk through the LinkedGeoPolygon in the binding.
Sub-Issues and PRs
To avoid one giant PR, I've been trying to break this up:
- #1098
- #1101
- #1104
- #1113
- TODO: review
*.c/*.hfile organization after all functionality added, as mentioned in https://github.com/uber/h3/pull/1101#discussion_r2627689696 - https://github.com/uber/h3/issues/1108
- https://github.com/uber/h3/issues/1110
- consider a mode flag, for things like skipping input validation
- API consideration: should
uncompactCellsToMultiPolygonjust completely subsumecellsToMultiPolygon, so we only need the former? - https://github.com/uber/h3/issues/1114
- https://github.com/uber/h3/issues/1117
- https://github.com/uber/h3/issues/1127
Source: uber/h3