Skip to content

Feat/new operators - #56

Merged
profsergiocosta merged 2 commits into
mainfrom
feat/new-operators
Oct 3, 2026
Merged

profsergiocosta merged 2 commits into
mainfrom
feat/new-operators

Conversation

@profsergiocosta

Copy link
Copy Markdown
Member

No description provided.

claude added 2 commits October 2, 2026 20:55
- sum accepts vector sources. With params area = true each polygon's
  attribute is shared among the cells in proportion to the intersected
  area (TerraME's sum with area = true), conserving the total; without it
  every feature adds its whole value to each cell it touches. The column
  defaults to the target name (params column overrides). Vector sources
  are not clipped to the grid for sum, so a polygon crossing the border
  keeps its full denominator.
- median operator (fine-aligned, like std).
- std takes params ddof (0 default, 1 sample); defaults and spec_hash
  are unchanged.

Verified against TerraME on Itaituba: population within 4e-7 in all 620
cells, total conserved. Tests and docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Fill benchmarks were described against a reference file that TerraME
2.0.1 does not reproduce. Against the goldens of LambdaGeo/luccme-goldens:

- coverage divides by the valid pixels, so `percentage` matches with no
  `coverage_purity` correction (Itaituba max 0.0064, Amazônia identical);
- distance is measured from the cell centre to the nearest vertex of the
  feature: `distance` is identical for points and smaller for lines where a
  line passes between vertices (mean 24 m on Itaituba, 300 m on Amazônia);
  `min_distance` errs by up to about a cell (1.2 km and 12 km mean).

Rewrite the correspondence tables, the Itaituba and Amazônia sections, the
known gaps and the positioning statement accordingly; drop the stale "sum with
area = true is not implemented" gap; fix the DistanceOperator docstring, which
claimed TerraME is smaller by half a cell diagonal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@profsergiocosta
profsergiocosta merged commit cef6ee2 into main Oct 3, 2026
6 checks passed
@profsergiocosta
profsergiocosta deleted the feat/new-operators branch October 4, 2026 18:23
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