Repository navigation
v0.8.2
Two correctness fixes and one documentation change. This covers every change since v0.8.1: #242, #244 and #246.
- Antimeridian features were hexed the long way round the globe (#241). Data may have been wrong, with no error.
workflowaccepted a source it couldn't read and wrote a manifest sized for a made-up feature count (#235). This is a behavior change: that case is now an error.
Features crossing ±180° are filled the short way (#241, #242)
Any feature wider than 180° in plain longitude terms was cut into 90° longitude bands before polyfill. That step exists for features that truly circle the globe (#145), but it also caught narrow features that merely cross the antimeridian: an Aleutian island, a North Pacific management area. For those, the band pieces covered the wrong-way ~359° region.
| ~150 km² box straddling 180° at 52°N, res 7 | cells |
|---|---|
| before | 54,521, wrapping the globe |
| now | 28 (= H3's own fill; ≈ 29 expected from area) |
Large crossers hit the #167 fail-fast error. Smaller ones wrote the wrong cells with no error.
Now crossers are told apart from circumpolar features by their vertex longitudes, and left to H3, which fills them the short way. A crosser's vertices leave a gap of more than 180° in longitude; a circling feature's vertices leave none. Vertices exactly on ±180 don't count toward the gap, which is how a full band like POLYGON((-180 -78, 180 -78, …)) is written. Circumpolar features are still split.
Three other steps now measure crossers by their short-way size: the per-feature size guard (#107/#167), --resolution-by-area binning, and the sub-cell fallback point (#104), which used to land near 0° longitude.
This also fixes single-part lines that jump across 180°. Their line buffer (0.8.1, #239) is itself a crosser: 11 of 11 cells now, versus ~34,000 before.
Rebuild any dataset with features that cross ±180°. A dateline-crossing feature that is simply too large for the target resolution still fails fast. The error no longer tells you to split it at ±180° upstream.
workflow fails on a source it can't read (#235, #244)
When the feature count failed (a 404, a typo in the bucket name, missing credentials), workflow assumed max_completions × 1000 features, exited 0 and wrote a complete, plausible-looking 200-way hex fan-out. For an 847-feature source, that means chunks up to 200× larger than a real count would give. It also suggested setting --chunk-size, a flag workflow doesn't accept.
Now the count runs before anything is written. If it fails:
- by default, the command exits 1 with an error naming the source and the cause, and writes no files;
- with
--expect-features N, the hex job is sized from N. Use this for a source that is right but can't be counted from where you generate, for example one not uploaded yet. The convert step already enforces that count at runtime (#186), so a job sized from it can't quietly be wrong.
| case (public MRE from #235) | before | now |
|---|---|---|
| source URL that 404s | exit 0, completions: 200 |
exit 1, nothing written |
… with --expect-features 847 |
— | exit 0, completions: 1 |
| readable source | exit 0, completions: 1 |
unchanged |
--expect-features N.
Documentation (#246)
AGENTS.md now has a section, Verifying Changes to the Tool:
- reproduce an issue's MRE on the released image before changing code;
- test a branch in a short cluster Job that clones it inside the image, using the copy-paste manifest provided.
What NOT To Do now rules out building environments or running tests, MREs or the CLI on the shared dev pod.
Also
Issue #236 (backoffLimit: 0 on indexed hex jobs) was closed without a code change. It was already fixed by #205, before this release series: generated hex jobs carry backoffLimitPerIndex (--hex-retries, default 2), maxFailedIndexes (--max-failed-indexes, default 1), and ignore preemptions.