Class: QgsProfileExporter¶
Handles exports of elevation profiles in various formats.
Added in version 3.32.
Methods
Runs the profile generation. |
|
Returns a list of vector layer containing the exported profile results. |
- class qgis.core.QgsProfileExporter[source]¶
Bases:
object
- __init__(sources: Iterable[QgsAbstractProfileSource], request: QgsProfileRequest, type: Qgis.ProfileExportType)
Constructor for QgsProfileExporter, using the provided list of profile
sources
to generate the results.After construction, call
run()
to initiate the profile generation.- Parameters:
sources (Iterable[QgsAbstractProfileSource])
request (QgsProfileRequest)
type (Qgis.ProfileExportType)
- run(self, feedback: QgsFeedback | None = None)[source]¶
Runs the profile generation. This method must be called before retrieving any results from the exporter.
This method is safe to run in a background thread.
- Parameters:
feedback (Optional[QgsFeedback] = None)
- toLayers(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]