Skip to content

Revising ADAPT Standard's Unit Of Measures  #172

@kelly-nelson

Description

@kelly-nelson

Following discussions between members of AgGateway and QUDT, I'm creating an issue to discuss enhancing Units of Measure.

Use Cases

An ADAPT Standard consumer wishes to programmatically convert an ADAPT unit code into a UOM construct in a library in their chosen platform without hardcoding unit mappings in their code.

An ADAPT Standard consumer wants more than just the English name for a given unit code, either because they want to map to a different language, or they want richer information on what the unit means.

Current Processes

Currently the ADAPT Unit of Measure file maps only an english name of the unit, classified within the English name of the dimension. Without using the ADAPT Framework C# conversion code, users must create their own mappings of ADAPT codes to any unit of measure systems/converters used, as well as write parsing logic for the compound unit syntax. There is already divergence between the ADAPT Standard and Framework on units, and this will get larger.

QUDT, UCUM, and UN/CEFACT Req20 are formal catalogs of units that also have varying degrees of additional context (such as conversion factors).

QUDT and UCUM are supported by libraries in java, but otherwise none of these standards appear to have wide support in software. The problem of reading a unit code and constructing it into strongly typed unit of measure does not appear to be widely supported (if at all). The degree to which programming languages have widely-used libraries for units of measure, interoperability does not seem to be a common use case.

Proposed Object Model

Add a new unit mappings file alongside the existing ADAPT abbreviations file like the below. It would only include units of measure used in the Data Type Definitions

"unit_mappings": [ "kg1ha-1": [ "qudt": "http://qudt.org/vocab/unit/KiloGM-PER-HA", "ucum": "kg/[har]" ], ... ]

This may involve pull requests to QUDT for unsupported units (UCUM has a syntax to make compound units from simple units like ADAPT), and wouldn't do anything with UNCEFACT Req 20 for compound units.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions