Class: QgsMeasureUtils¶
Utilities for handling and formatting measurements.
Added in version 4.0.
List of all members, including inherited members
Static Methods
Formats an area measurement (with the specified unit) for use with a project, respecting the project's area unit settings. |
|
Formats a distance measurement (with the specified unit) for use with a project, respecting the project's distance unit settings. |
- class qgis.core.QgsMeasureUtils[source]¶
Bases:
object- static formatAreaForProject(project: QgsProject | None, area: float, unit: Qgis.AreaUnit) str[source]¶
Formats an
areameasurement (with the specifiedunit) for use with aproject, respecting the project’s area unit settings.- Parameters:
project (Optional[QgsProject])
area (float)
unit (Qgis.AreaUnit)
- Return type:
str
- static formatDistanceForProject(project: QgsProject | None, distance: float, unit: Qgis.DistanceUnit) str[source]¶
Formats a
distancemeasurement (with the specifiedunit) for use with aproject, respecting the project’s distance unit settings.- Parameters:
project (Optional[QgsProject])
distance (float)
unit (Qgis.DistanceUnit)
- Return type:
str