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
| Attribute | Type | Description |
|---|---|---|
| STANDARD_UNIT | string | The default unit of measurement for area calculations, derived by applying the area prefix to the standard distance unit. |
| UNITS | dict | A mapping of area unit identifiers to their conversion factors relative to the standard unit, including squared distance units and hectares. |
| ALIAS | dict | A dictionary providing alternative names for area units, mapping common aliases like 'hectare' to their canonical unit identifiers. |
| LALIAS | dict | A 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
| Name | Type | Description |
|---|---|---|
| default_unit | string | The default unit of measurement for the area instance. |
| **kwargs | dict | Keyword arguments representing the unit and its corresponding value. |