Skip to main content

Post-disaster building damage record layer: 🔴危険 / 🟡要注意 / 🟢調査済 / ⬜未調査 + confidence + provenance, bound to persistent building IDs. Honest by construction: covered=false ⇒ value=null.

Project description

Yodo Labs

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

CI Python 3.9–3.13 Code: Apache-2.0 Data: CC BY 4.0 Honesty invariant

地震の後で本当に知るべきは「壊れた建物」ではなく、「まだ確認していない建物」です。
After the quake, the most important thing to know is not which buildings are broken — it's which ones you haven't checked yet.

plateau-triage Noto demo — red/yellow/green extruded buildings with grey unsurveyed slabs, a coverage meter, and a legend
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 -e .            # pydantic, jsonschema, shapely, duckdb
python -m plateau_triage.cli demo \
    --input fixtures/copernicus_noto_sample.geojson --out out/
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 --input at 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 provenance panel showing a building's state, confidence, dataset, observed-at and ID-binding confidence
クリック溯源 / 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:

  1. Write sideRecord (pydantic) makes it structurally impossible to build a covered=false record with a value or a confidence.
  2. Wire side (JSON)validate_record() checks the serialised record against the frozen contracts/record.schema.json shared 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).
  3. Extraction — field perception abstains to 未調査 below its confidence threshold.
  4. Ingest — an unseen / poorly-localised AOI building is explicitly 未調査; a later "safe" reading can never bury an earlier danger.
  5. Export — refuses to emit a known/safe claim for an unsurveyed building (FalseSafeError).
  6. 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.0LICENSE)、データ CC BY 4.0LICENSE-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
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

plateau_triage-0.1.0.tar.gz (66.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plateau_triage-0.1.0-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file plateau_triage-0.1.0.tar.gz.

File metadata

  • Download URL: plateau_triage-0.1.0.tar.gz
  • Upload date:
  • Size: 66.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plateau_triage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8fb1d1e8e7e8df70a29ad7c10c9a23c06fcf697cd05597b754d408dbb16bf714
MD5 aa13b1062557330506734e79722547d8
BLAKE2b-256 4151de65658f95fd39cfd01545ba6f65f110727458eb714ad384d1edb0809ab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for plateau_triage-0.1.0.tar.gz:

Publisher: release.yml on pixelx-jp/plateau_triage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plateau_triage-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plateau_triage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plateau_triage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d0aa0ff158f585cf266588b9a220819e971e531f6b58be8696026d2d9182003
MD5 8d2982bb3658f1d588251313be0fb061
BLAKE2b-256 9bf1e34ae40ffc943a9c1915996ff0211ad7fb97bedc09816e76c94327942ce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for plateau_triage-0.1.0-py3-none-any.whl:

Publisher: release.yml on pixelx-jp/plateau_triage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page