Skip to main content

Area

This class represents an area measurement and provides functionality for handling various square units and conversions. It supports arithmetic operations, such as division by numeric types, while maintaining unit consistency. The class integrates with distance-based units and includes specific area aliases like hectares.

Attributes

AttributeTypeDescription
STANDARD_UNITstringThe default unit of measurement for area calculations, derived by applying the area prefix to the standard distance unit.
UNITSdictA mapping of area unit identifiers to their conversion factors relative to the standard unit, including squared distance units and hectares.
ALIASdictA dictionary providing alternative names for area units, mapping common aliases like 'hectare' to their canonical unit identifiers.
LALIASdictA lowercase version of the ALIAS dictionary used for case-insensitive lookups of area unit names.

Constructor

Signature

def Area(
default_unit: string,
**kwargs: dict
) - > null

Parameters

NameTypeDescription
default_unitstringThe default unit of measurement for the area instance.
**kwargsdictKeyword arguments representing the unit and its corresponding value.