Class: QgsProfileExporterTask¶
Handles exports of elevation profiles in various formats in a background task.
Added in version 3.32.
Class Hierarchy¶
Base classes¶
Abstract base class for long running background tasks.  | 
|
Enums
Results of exporting the profile.  | 
Methods
Returns a list of layer files created during the export.  | 
|
Returns a descriptive error message, if available.  | 
|
Returns the result of the export operation.  | 
|
Returns a list of vector layer containing the exported profile results.  | 
- class qgis.core.QgsProfileExporterTask[source]¶
 Bases:
QgsTask- __init__(sources: Iterable[QgsAbstractProfileSource], request: QgsProfileRequest, type: Qgis.ProfileExportType, destination: str | None, transformContext: QgsCoordinateTransformContext)
 Constructor for QgsProfileExporterTask, saving results to the specified
destinationfile.If
destinationis an empty string then the profile results will be generated only and can be retrieved by callingtakeLayers().- Parameters:
 sources (Iterable[QgsAbstractProfileSource])
request (QgsProfileRequest)
type (Qgis.ProfileExportType)
destination (Optional[str])
transformContext (QgsCoordinateTransformContext)
- class ExportResult(*values)¶
 Bases:
IntEnumResults of exporting the profile.
Success: Successful exportEmpty: Results were emptyDeviceError: Could not open output file deviceDxfExportFailed: Generic error when outputting to DXFLayerExportFailed: Generic error when outputting to filesCanceled: Export was canceled
- Canceled = 5¶
 
- DeviceError = 2¶
 
- DxfExportFailed = 3¶
 
- Empty = 1¶
 
- LayerExportFailed = 4¶
 
- Success = 0¶
 
- createdFiles(self) List[str][source]¶
 Returns a list of layer files created during the export.
- Return type:
 List[str]
- result(self) QgsProfileExporterTask.ExportResult[source]¶
 Returns the result of the export operation.
See also
- Return type:
 
- takeLayers(self) List[QgsVectorLayer]¶
 Returns a list of vector layer containing the exported profile results.
While this method attempts to condense all results into a single layer, multiple layers may be returned when the geometry types of exported features differs.
Ownership of the returned layers is transferred to the caller.
- Return type:
 List[QgsVectorLayer]