Class: QgsProfileExporter

class qgis.core.QgsProfileExporter

Bases: sip.wrapper

Handles exports of elevation profiles in various formats.

New in version 3.32.

QgsProfileExporter(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.

Methods

run

Runs the profile generation.

toLayers

Returns a list of vector layer containing the exported profile results.

run(self, feedback: QgsFeedback = None)

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 (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]