Skip to content

Commit 19b3c70

Browse files
authored
guidance(#356): rebut "the area terms cancel" in the fractional-overlay rule (#360)
* guidance(#356): rebut "the area terms cancel" in the fractional-overlay rule Gate run on dev (regression tier, ca-30x30, 2026-08-07): glm-5.2 2/2 pass, deepseek 1/2. The failing trial found the right weights asset and then reasoned its way back out of the area term: "SUM(frac × (w1+w2)) / SUM(frac) × 100. Because numerator and denominator use the same cells, cell area cancels." That is coherent and false — the cells are shared but unequal in area, so the terms only cancel if every cell has the same area. Showing the correct SQL is not enough when the model has a plausible-sounding reason to deviate from it. Names the false step and rebuts it in place, rather than adding a parallel rule. No new SQL block. * guidance(#356): say what actually fails to cancel — area is not constant across cells Previous wording read "numerator and denominator run over the same cells, but those cells differ in area", whose antecedent is ambiguous: it can be read as a single cell having two different areas, which is nonsense and invites the reader to discard the whole sentence. The condition that matters is that h3_cell_area is not constant ACROSS cells, so it is not a common factor and cannot be pulled out of either sum. State that directly, and say explicitly that a shared index set is not sufficient for cancellation — that was the model's actual false step. * guidance(#356): tighten the cancellation rebuttal to two clauses Said "cancel"/"come out"/"divides out" four times and repeated "keep it in both sums". Cut to the appearance, the reason, and the consequence — nothing else was carrying weight. * guidance(#356): drop the imperative-shaped clause; point at why h3_cell_area exists "Drop it and every cell counts equally" opens with an imperative verb. A small model reading the guide as instructions can take that as the instruction, which is the same hazard AGENTS.md:137 records for antipattern SQL blocks — structure reproduces regardless of the surrounding framing. Replaced with the salient fact: cells at one resolution differ in area, which is what h3_cell_area exists to measure. If area followed from resolution alone the function would be unnecessary, so the guide now argues from something the model can already see rather than from a rule it has to accept.
1 parent bf74991 commit 19b3c70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

h3-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ GROUP BY class;
292292

293293
`get_schema` names the fractions asset and the no-data code. Per cell `SUM(frac) <= 1`; the shortfall is outside-raster/quantization, so do not treat the layer as covering 100% of a cell.
294294

295-
**Overlaying two partial-coverage layers — multiply the coverage fractions, then weight by cell area; never count a cell as all-or-nothing.** *(Skip unless you are intersecting a fractional-coverage layer with another layer that only partly covers its cells — e.g. "what percent of each habitat class is conserved".)* Treating a cell as fully inside the other layer whenever it matches over-counts every partly-covered cell. Weight by the coverage fraction on **both** sides, and carry `h3_cell_area` through numerator and denominator: cells are not equal-area, so dividing by `SUM(frac)` alone biases the share toward whichever latitudes hold more cells.
295+
**Overlaying two partial-coverage layers — multiply the coverage fractions, then weight by cell area; never count a cell as all-or-nothing.** *(Skip unless you are intersecting a fractional-coverage layer with another layer that only partly covers its cells — e.g. "what percent of each habitat class is conserved".)* Treating a cell as fully inside the other layer whenever it matches over-counts every partly-covered cell. Weight by the coverage fraction on **both** sides, and carry `h3_cell_area` through numerator and denominator. It looks like it divides out; it does not — cells at the same resolution differ in area, which is what `h3_cell_area` exists to measure.
296296

297297
The other layer's per-cell weight comes from a companion **per-cell weights asset** when one exists — `get_schema` names it (e.g. ca30x30 conserved-areas publishes `…-hex-weights` at res 10, with `w1``w4` giving the share of each cell in GAP status 1–4). Otherwise reduce the layer's features to one weight per cell first: `MAX` over the features on the cell of the per-feature coverage share its STAC documents.
298298

0 commit comments

Comments
 (0)