(Multi)polygon helper functions#1104
Conversation
|
Last Thursday, we discussed what One option is to raise an error. However, I'm not a fan of this choice because I think it creates an artificial discontinuity in the API. Users should be able to supply no cells, all cells, and everything in between, and expect a reasonable answer, without having to catch and handle a special case. It would also be nice for The other (current) option is to return a "globe multipolygon or polygon", which is what I was planning with Another option is to return an alternative globe multipolygon that has something to do with the H3 geometry, like the base icosahedron. This has the downside of being less nice for downstream libraries, but, on the other hand, it probably doesn't make sense to single out this one specific case, since any other valid output might cross the antimeridian and/or poles. I don't like the idea of raising an error, and the implementation can always change for the globe multipolygon, so I'll try implementing |
|
After looking into it, I don't see an obvious simple construction of the icosahedron faces for For the time being, I think I prefer the existing construction, since it is the simplest thing that meets the needs of #1103. I'll make a follow-up task where we can consider if we'd prefer some other construction. |
nrabinowitz
left a comment
There was a problem hiding this comment.
Looks good to me 👍. After our discussion, I think the triangle-based globe multipolygon is a reasonable option.
Continuation of #1101, please review that first.
public API functions
destroyGeoMultiPolygoninternal functions
destroyGeoLoopdestroyGeoPolygongeoPolygonAreaRads2geoMultiPolygonAreaRads2createGlobalMultiPolygon