Post-disaster building damage record layer: 🔴危険 / 🟡要注意 / 🟢調査済 / ⬜未調査 + confidence + provenance, bound to persistent building IDs. Honest by construction: covered=false ⇒ value=null.
Project description
plateau-triage 🚩
災害建物トリアージ — 被災後の建物損傷記録層
Post-disaster building damage record layer
被災影像を、逐栋・公式建物ID紐付け・確信度+出処つきの損傷状態記録に変える。
そして何より 「まだ確認していない建物」を明示する。
Turn disaster imagery into a per-building, ID-bound record of damage state —
with confidence, provenance, and, above all, an explicit "not yet surveyed".
pip install -e . ·
docs ·
DESIGN ·
Code Apache-2.0 · Data CC BY 4.0
地震の後で本当に知るべきは「壊れた建物」ではなく、「まだ確認していない建物」です。
After the quake, the most important thing to know is not which buildings are broken — it's which ones you haven't checked yet.
Noto demo: 🔴危険 / 🟡要注意 / 🟢調査済 extruded by severity, ⬜未調査 as the visible grey gaps, with the coverage meter. make demo && make viz-dev
被災都市のすべての建物 = 1 つの誠実な記録。4 状態のいずれか × 確信度 × 出処。 Every building in a stricken city is one honest record, in one of four states:
| 状態 / state | 意味 / meaning | record | |
|---|---|---|---|
| 🔴 | 危険 | dangerous | covered=true, value="危険" |
| 🟡 | 要注意 | needs caution | covered=true, value="要注意" |
| 🟢 | 調査済 | inspected, safe | covered=true, value="調査済" |
| ⬜ | 未調査 | not yet surveyed = unknown | covered=false, value=null |
最初の 3 つは応急危険度判定の赤黄緑に対応します。第 4 の 未調査 は、スタック共通の
誠実性不変条件 covered=false ⇒ value=null の字面化です——誰も見ていない建物は
決して「安全」に既定されません。護城河は損傷識別モデルではなく、この誠実契約 +
公式建物IDへの紐付けです。
The first three mirror Japan's 応急危険度判定 red/yellow/green tags. The fourth,
未調査, is the literal form of the stack-wide honesty invariant
covered=false ⇒ value=null: a building nobody has looked at is never
defaulted to "safe". That honesty contract — plus binding to a persistent
building ID — is the moat, not the damage-classification model.
Quickstart
pip install plateau-triage # from PyPI (pydantic, jsonschema, shapely, duckdb)
plateau-triage demo --out out/ # runs on the bundled Copernicus Noto sample
# point at your own data: plateau-triage demo --input your_footprints.geojson --out out/
# from a clone, for dev: pip install -e ".[dev,shacl]" # + ruff, pyshacl/rdflib
plateau-triage — Noto demo
ingested 12 footprints from fixtures/copernicus_noto_sample.geojson
coverage: 8 / 12 assessed; 33% unknown
state breakdown:
🔴 危険 danger 3
🟡 要注意 caution 3
🟢 調査済 inspected 2
⬜ 未調査 unsurveyed 4
outputs:
geojson out/triage.geojson # red/yellow/green/grey choropleth (plateau-r3f / any viewer)
coverage out/coverage.json # the coverage meter
duckdb out/records.duckdb # the record layer (DuckDB; also writes .parquet on request)
support_csv out/support_system.csv # 被災者支援システム screening feed
risai_csv out/risai_shomei.csv # 罹災証明 pre-fill candidate feed (認定調査 still required)
これは Noto go/no-go デモです。現場作業ゼロ・PLATEAU/ネットワーク依存ゼロ。
This is the Noto go/no-go demo: zero fieldwork, zero PLATEAU/network
dependency. 輪島は PLATEAU 未収録のため dataset_footprint ID で紐付け・2.5D 描画
します(PLATEAU 建物ID+3D は生産経路)。It uses public Copernicus-shaped damage
footprints near Wajima (輪島), which is not in PLATEAU — so records bind
dataset_footprint IDs. Binding to PLATEAU 建物ID + 3D is the production path.
同梱 fixture は実 Copernicus EMS Noto 2024 スキーマと同形の 12 棟合成サンプルです。 The shipped fixture is a 12-footprint synthetic sample mirroring the Copernicus EMS Noto 2024 schema. Point
--inputat the real FeatureCollection to run it for real.
可視化 / Visualisation (plateau-r3f)
赤黄緑灰の 2.5D 着色 + カバレッジ計 + クリック溯源。日英バイリンガル UI。 The red/yellow/green/grey 2.5D choropleth + coverage meter + click-to-trace, bilingual JP/EN.
make demo && make viz-data # writes the feed into viz/public/demo.geojson
make viz-install # cd viz && npm install
make viz-dev # http://localhost:5173 (or: make viz-build)
クリック溯源 / click-to-trace: 状態・確信度・データセット・観測日時・ID 紐付け確信度。未調査の建物は「安全と見なさない」と明示。
現場採集 / Field capture (drone · street)
python -m plateau_triage.cli capture --input fixtures/drone_capture_sample.json --out out/
弱い検出・未観測の建物は 未調査へ棄権し、決して「安全」に既定しません(§6.2 優雅な劣化)。VSRD/SfM/SAM は差し替え可能なプラグ。A weak or unseen building abstains to 未調査, never defaulted to safe; VSRD/SfM/SAM are pluggable backends.
既存システムへ供給 / Feed existing systems
python -m plateau_triage.cli export --records out/records.duckdb --out out/feed.csv --format both
被災者支援システム + 罹災証明(被害認定調査の事前入力候補——証明そのものでは ありません)。Both the 被災者支援システム feed and the 罹災証明 pre-fill candidate (never the certificate itself — the 認定調査 always governs). See docs/integration.md.
Pipeline
GeoJSON footprints + damage_grade drone / street capture session
│ accrue.ingest_batch │ accrue.ingest_capture
│ (missing grade ⇒ 未調査) │ (weak / unseen ⇒ 未調査)
▼ ▼
honest Records ── accrue.state_extract (honesty policy)
│ bind (resolve() → persistent id + geom_binding_conf)
▼
┌──────────────────────────── record layer (store: GeoParquet / DuckDB) ────────────────────────────┐
│ query (RecordIndex: by id / bbox / triage queue / explicit unknown) ── caveat-mcp mounts this │
│ coverage ("8 / 12 assessed; 33% unknown") │
│ viz (red/yellow/green/grey GeoJSON → plateau-r3f) │
│ export (被災者支援システム · 罹災証明 pre-fill) │
│ eval (self-proving: calibration + symmetric honesty penalty) │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
| module | role |
|---|---|
plateau_triage.record |
the one honest record contract (states + model + frozen-schema validator) |
plateau_triage.accrue.ingest_batch |
batch import of public damage datasets → records |
plateau_triage.accrue.ingest_capture |
drone/street capture session → records (unseen ⇒ 未調査) |
plateau_triage.accrue.state_extract |
per-building damage extraction + the honesty/abstention policy |
plateau_triage.bind |
pin records to a persistent building id (Resolver plug; StubResolver for the demo) |
plateau_triage.coverage |
the coverage meter + triage ordering |
plateau_triage.store |
record-layer persistence (flat GeoParquet / DuckDB) |
plateau_triage.query |
honest query surface (by id / bbox / triage queue / explicit unknown) — caveat-mcp mounts it |
plateau_triage.viz |
red/yellow/green/grey GeoJSON feed for plateau-r3f |
plateau_triage.export |
被災者支援システム + 罹災証明 screening feeds |
plateau_triage.eval |
self-proving honesty eval (ECE + symmetric penalty) |
viz/ |
the plateau-r3f front-end (Vite + React Three Fiber, bilingual) |
Honesty, enforced everywhere / 誠実性は多重に強制される
不変条件は独立に多重防御されており、ドリフトは静かな退行ではなくテスト失敗になります。 The invariant is guarded independently so drift is a test failure, not a silent regression — see docs/honesty-spec.md:
- Write side —
Record(pydantic) makes it structurally impossible to build acovered=falserecord with a value or a confidence. - Wire side (JSON) —
validate_record()checks the serialised record against the frozencontracts/record.schema.jsonshared by all seven repos. Wire side (RDF) — the optional[shacl]extra validates the same invariant natively in SHACL over a SOSA/PROV-O projection (docs/standards.md). - Extraction — field perception abstains to 未調査 below its confidence threshold.
- Ingest — an unseen / poorly-localised AOI building is explicitly 未調査; a later "safe" reading can never bury an earlier danger.
- Export — refuses to emit a known/safe claim for an unsurveyed building (
FalseSafeError). - Query — answers "unknown, not safe" for a building it has no record of.
Contract
record.schema.json is the frozen, shared "universal honest record" plug (state,
rules and hazard are the same shape — only attribute differs). It is vendored
at plateau_triage/contracts/record.schema.json; binding to a persistent id is
delegated to plateau-id-resolve via the Resolver interface. The same record
also projects onto SOSA + PROV-O (record.context.jsonld) and is checkable
in SHACL (record.shacl.ttl) — standards alignment, not a new standard
(docs/standards.md).
Test
python -m pytest # 114 tests (incl. SHACL when the extra is installed)
pip install -e ".[shacl]" # optional: RDF/SHACL honesty check (rdflib + pyshacl)
cd viz && npm run build # the plateau-r3f front-end builds clean
Docs / ドキュメント
- docs/honesty-spec.md — 誠実性の不変条件と強制箇所 / the invariant and where it's enforced
- docs/standards.md — SOSA・PROV-O・nilReason 整合と SHACL / standards alignment + SHACL
- docs/data-sources.md — データソース・PLATEAU 被覆・ライセンス / data, PLATEAU coverage, licensing
- docs/integration.md — 既存システム・caveat-mcp・plateau-r3f 連携 / integration
License / ライセンス
コード Apache-2.0(LICENSE)、データ CC BY 4.0
(LICENSE-DATA、PLATEAU / Copernicus 署名を含む)。
Code Apache-2.0; data CC BY 4.0 (incl. PLATEAU / Copernicus attribution).
本プロダクトは既存システムへ供給する スクリーニング層であり、人が署名する法定 被害認定調査の代替ではありません。A screening layer that feeds existing systems — not a replacement for the legal 被害認定調査 a human signs.
Yodo Labs · PixelX Inc. / ピクセルエックス株式会社
yodolabs.jp · pan@yodolabs.jp
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plateau_triage-0.1.1.tar.gz.
File metadata
- Download URL: plateau_triage-0.1.1.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6756df4baaf0af92b4976b487f5dbe7758fc0d314d5a302cdfdd27a12a85fcd
|
|
| MD5 |
ee6b3eacc3b1bdeb72545a3ac8ea9e67
|
|
| BLAKE2b-256 |
d4c60c0c0218ea3de1b459e9f278acf3fc85a67982fddcc8d7f378a1ae3eab18
|
Provenance
The following attestation bundles were made for plateau_triage-0.1.1.tar.gz:
Publisher:
release.yml on pixelx-jp/plateau_triage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plateau_triage-0.1.1.tar.gz -
Subject digest:
c6756df4baaf0af92b4976b487f5dbe7758fc0d314d5a302cdfdd27a12a85fcd - Sigstore transparency entry: 1811074181
- Sigstore integration time:
-
Permalink:
pixelx-jp/plateau_triage@3dff245bdfe7975969a0bb0f43cc5486bcb79d53 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/pixelx-jp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3dff245bdfe7975969a0bb0f43cc5486bcb79d53 -
Trigger Event:
push
-
Statement type:
File details
Details for the file plateau_triage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: plateau_triage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 61.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d92732d85de117646d03ada5395cb1c97333a3f80e1ddc289e68b3d3f68a982
|
|
| MD5 |
5293161424b74d19d4d9aca1b06b87fa
|
|
| BLAKE2b-256 |
026beaa03c56364c37dec1e0387e34dd0663cf88be919da1770927be5184e015
|
Provenance
The following attestation bundles were made for plateau_triage-0.1.1-py3-none-any.whl:
Publisher:
release.yml on pixelx-jp/plateau_triage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plateau_triage-0.1.1-py3-none-any.whl -
Subject digest:
0d92732d85de117646d03ada5395cb1c97333a3f80e1ddc289e68b3d3f68a982 - Sigstore transparency entry: 1811074193
- Sigstore integration time:
-
Permalink:
pixelx-jp/plateau_triage@3dff245bdfe7975969a0bb0f43cc5486bcb79d53 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/pixelx-jp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3dff245bdfe7975969a0bb0f43cc5486bcb79d53 -
Trigger Event:
push
-
Statement type: