fix(landscape): func_zoning ranks the original P suitability rasters, not C

The reference notebook ("Three scenarios" cells) and zoning_core.py feed E plus
the five P_* WEIGHTED_CLASS rasters into functional zoning; the diagram folder
300-…-Equals_102_202 pointing at the C layers was a drawing error. C_k =
min(P_k, E) stay diagnostic conflict layers. Node 30 keeps its code/stage;
its changed inputs change every fingerprint, so V1–V3 recompute on the next run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 21:45:39 +05:00
parent dae9294b4d
commit 2544d4e146
4 changed files with 34 additions and 7 deletions

View File

@@ -112,11 +112,14 @@ every node of all lower stages finished. Every input and output of every node is
| 10 | e_ecological_constraint | `lp-z-integrated`, `lp-u-integrated` | `lp-e` |
| 20 | c_conflicts | `lp-p-irrigation`, `lp-p-snow`, `lp-p-crop`, `lp-p-pasture`, `lp-p-tourism`, `lp-e` | `lp-c-irrigation`, `lp-c-snow`, `lp-c-crop`, `lp-c-pasture`, `lp-c-tourism` |
| 21 | p_max | five P groups | `lp-p-max` |
| 30 | func_zoning | `lp-e`, five C groups | `lp-v1-conservative`, `lp-v2-balanced`, `lp-v3-development` |
| 30 | func_zoning | `lp-e`, five P groups (original suitability) | `lp-v1-conservative`, `lp-v2-balanced`, `lp-v3-development` |
| 31 | c_max | five C groups | `lp-c-max` |
Sector order everywhere: 1 irrigation, 2 snow, 3 crop, 4 pasture, 5 tourism.
**Decision:** func_zoning takes S_k = C_k (folder `300-…-Equals_102_202`), not P_k.
**Decision (revised 2026-09-11):** func_zoning takes S_k = P_k, the original suitability
rasters, as in the reference notebook ("Three scenarios" cells) and `zoning_core.py`.
The diagram folder `300-…-Equals_102_202` pointing at the C layers was a drawing error;
C_k = min(P_k, E) are diagnostic conflict layers and never replace P_k in zoning.
Groups and the category `landscape` ("Ландшафтная программа") are seeded by
migration `00011_landscape.sql` (`INSERT … ON CONFLICT (code) DO NOTHING`). The
@@ -140,7 +143,7 @@ numpy does with a float32 array.
| c_conflicts (5 outputs) | P_j ∧ E valid | `min(P_j, E)` |
| p_max | at least one P valid | `max` over valid P |
| c_max | at least one C valid | `max` over valid C |
| func_zoning (3 outputs) | see TZ §4 | see below |
| func_zoning (3 outputs) | see TZ §4; S_k = P_k | see below |
Functional zoning (TZ `TZ_functional_zoning_go.md`, reference `zoning_core.py`):