• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / h3 / 6710188823
99%

Build:
DEFAULT BRANCH: master
Ran 31 Oct 2023 05:28PM UTC
Jobs 1
Files 19
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Oct 2023 05:20PM UTC coverage: 98.784% (+0.1%) from 98.657%
6710188823

push

github

web-flow
Alternate polygonToCells algorithm (#785)

This PR implements an alternate algorithm for `polygonToCells`, which provides `polygonToCompactCells` as a byproduct.

### Algorithm Overview
```
let cell = base cell 0
while cell:
  res = getResolution(cell)
  if res == target res:
     if cell is in polygon:
        set output to cell and return
  if res < target res:
     let bbox = boundingBox(cell) // where bbox is padded to contain all descendants
     if bbox intersects polygon:
        if bbox is contained by polygon:
          set output to cell and return
        cell = first child of cell
        continue
  cell = next cell // where "next" is the next sibling, or next sibling of parent, etc
when cell is null we're done
```

### Results
 -  This PR includes an iterator-based algo with full test parity to the current algorithm. In its iterator form, it takes very little memory and that memory does not scale with the size of the output - so we can stream cells out of a very large polyfill process without worrying about memory issues.
- The new algo gives compact (or nearly compact) output by default, so we get `polygonToCellsCompact` effectively for free.
- The performance isn't exactly better or worse than the current algorithm - it just has different characteristics. In benchmarks, it's faster than the current algorithm in roughly 80% of cases

1589 of 1623 branches covered (0.0%)

Branch coverage included in aggregate %.

260 of 260 new or added lines in 5 files covered. (100.0%)

2717 of 2736 relevant lines covered (99.31%)

36322378.43 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6710188823.1 31 Oct 2023 05:28PM UTC 19
98.78
GitHub Action Run
Source Files on build 6710188823
  • Tree
  • List 19
  • Changed 13
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5d7c1c16 on github
  • Prev Build on master (#6644221710)
  • Next Build on master (#6739531678)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc