Skip to content

Gefahrgut: offline lookup by UN-Nummer #24

Done

Description

@ChrArlt

Problem / use case

From a Warntafel, a crew needs to know offline which substance it is facing and what to do first.

Proposed solution

Part of the Kennzeichnungen helper (#21), not a helper of its own: a crew reads both numbers off the same Warntafel, so the lookup sits beside the explanation of the upper number.

  • Input: UN-Nummer or substance name, typed into Kennzeichnungen' one search field. Four digits are a UN-Nummer; two or three stay the Gefahrnummer. A UN-NUMMER group button at the bottom of the page shows how to use it.
  • Output: the substance, its hazards, and first measures.

First step: find a dataset. This issue cannot be estimated until there is an offline dataset whose licence allows shipping it in an MIT app. If none exists, record that here and close the issue as not planned.

The data is bundled and never downloaded, so the app keeps needing no network and no permission. Related: the Kennzeichnungen reference (#21).

Open questions

  • Which dataset, and under which licence?
  • How does it stay current, given that ADR changes every two years?
  • How large is it, and what does that do to the APK?

Done when

  • Every reference value or text cites its source in the code.
  • Tests cover the rules.
  • Kennzeichnungen' page in DemoFlowRenderTests, its line in the README and in the Play listing cover the UN-Nummer.

Activity

  1. added
    enhancement
    on Nov 6, 2026
  2. ChrArlt commented on Nov 24, 2026

    @ChrArlt
    CollaboratorAuthor

    #89 is merged: Kennzeichnungen now looks up a UN-Nummer offline, under its own UN-NUMMER group and in the shared search. Four digits are a UN-Nummer; two or three stay the Gefahrnummer. It shows the Stoff, its Klasse, Gefahrzettel and Gefahrnummer beside a drawn Warntafel.

    Answers to the open questions, for the record:

    • Which dataset, which licence: ADR Tabelle A (3.2.1) in the official German text promulgated in the Bundesgesetzblatt. That is an amtliches Werk under § 5 Abs. 1 UrhG, free to reproduce. Germany has no consolidated ADR 2025, so it is assembled from:
      • the Bekanntmachung of 16 November 2021 (BGBl. 2021 II S. 1184, Anlageband)
      • the 29. ADRÄndV (BGBl. 2022 II Nr. 20)
      • the 30. ADRÄndV (BGBl. 2025 II Nr. 57)
    • How it stays current: scripts/gefahrgut/extract_tabelle_a.py extracts Tabelle A from the 2021 PDF. The later amendments are kept by hand in scripts/gefahrgut/aenderungen.tsv and neue-eintragungen.tsv, each with its BGBl page. For ADR 2027, add its changes there and run the script again.
    • Size: 2,668 rows for 2,347 UN-Nummern, 157 KB of TSV embedded in the Kennzeichnungen assembly, about 45 KB per ABI in the APK. It is bundled, never downloaded: no network, no permission.

    Still open: hazards beyond Klasse, Gefahrzettel and Gefahrnummer, and the first measures. Tabelle A has neither, so they need a second dataset with its own licence question. They have moved to #98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions