UnitEntry¶
- class geodetic_engine.catalog.UnitEntry[source]¶
Bases:
RegistryEntryA unit of measure the active database holds.
Listed by
units(), frompyproj.database.get_units_map().For reading a length or angle unit an OSDU payload states,
geodetic_engine.unitsis the module to use; this lists what PROJ knows.- kind¶
What the unit measures.
- conversion_factor¶
Multiplier to the SI unit of the same quantity: metres, radians, unity or seconds. None for a unit that is no plain multiple, such as EPSG’s sexagesimal degrees.
- proj_short_name¶
PROJ’s own short name for the unit, as a PROJ string writes it (
"us-ft"), or None.
- __init__(*, auth_name, code, name, deprecated, aliases=(), replaced_by=(), kind, conversion_factor, proj_short_name=None)¶
- to_json_dict()[source]¶
The unit as PROJJSON’s unit object, with its id.
PROJ exports a unit only inside another object, so this is the form it writes there. It has no
$schema: PROJJSON’s schema does not admit a unit as a document of its own.Example
>>> from geodetic_engine import catalog >>> foot = catalog.units(code="EPSG:9003").one().to_json_dict() >>> foot["type"], foot["name"], foot["id"] ('LinearUnit', 'US survey foot', {'authority': 'EPSG', 'code': 9003})