Skip to content

Conversation

@ajfriend
Copy link
Collaborator

@ajfriend ajfriend commented Dec 2, 2025

Continuation of #1101, please review that first.

  • public API functions

    • destroyGeoLoop
    • destroyGeoPolygon
    • destroyGeoMultiPolygon
  • internal functions

    • geoPolygonAreaRads2
      • note the logic for computing the area of holes properly
    • geoMultiPolygonAreaRads2
    • createGlobalMultiPolygon
      • We need some multipolygon to return when the user provides, for example, all the cells of a given resolution. Other options could work (like all the res 0 cells), but I think this one is nice because it is fairly simple, all the edge arcs are 90 degrees (our area functions can only handle arcs less than 180), and it has seams along the antimeridian, so other downstream libraries are more likely to be able to process it properly (as opposed to, say, one giant "world polygon")

@coveralls
Copy link

coveralls commented Dec 2, 2025

Coverage Status

coverage: 98.905% (-0.04%) from 98.949%
when pulling fb79132 on ajfriend:cagnoli_area2
into 312fbbc on uber:master.

@ajfriend ajfriend marked this pull request as ready for review December 4, 2025 00:06
@ajfriend ajfriend changed the title [WIP] (Multi)polygon helper functions (Multi)polygon helper functions Dec 4, 2025
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.

2 participants