length_unit¶
- geodetic_engine.units.length_unit(value)[source]¶
Read a length unit.
- Parameters:
value (
str) – A symbol or name in any case, such as"ft"or"metre"; an OSDUUnitOfMeasurerecord id, URL-encoded or not, such as"osdu:reference-data--UnitOfMeasure:ft:"; or an OSDU unit persistableReference,USOorUAD.- Raises:
UnitError – If
valueis none of these or not a length, or is a payload converting with an offset, by a rational polynomial, or by a scale that is not finite and positive.
Example
- Return type:
>>> length_unit("ftUS").scale == 1200 / 3937 True