Class: QgsTemporalUtils¶
- class qgis.core.QgsTemporalUtils¶
Bases:
sip.wrapper
Contains utility methods for working with temporal layers and projects.
New in version 3.14:
Methods
Calculates the temporal range for a
project
.Exports animation frames by rendering the map to multiple destination images.
- class AnimationExportSettings¶
- class AnimationExportSettings(QgsTemporalUtils.AnimationExportSettings) None
Bases:
sip.wrapper
- animationRange¶
- decorations¶
- fileNameTemplate¶
- frameDuration¶
- outputDirectory¶
- calculateTemporalRangeForProject(project: QgsProject) QgsDateTimeRange ¶
Calculates the temporal range for a
project
.This method considers the temporal range available from layers contained within the project and returns the maximal combined temporal extent of these layers.
- Parameters
project (QgsProject) –
- Return type
- exportAnimation(mapSettings: QgsMapSettings, settings: QgsTemporalUtils.AnimationExportSettings, feedback: QgsFeedback = None) Tuple[bool, str] ¶
Exports animation frames by rendering the map to multiple destination images.
The
mapSettings
argument dictates the overall map settings such as extent and size, while animation and export specific settings are specified via thesettings
argument.An optional
feedback
argument can be used to provide progress reports and cancellation support.- Parameters
mapSettings (QgsMapSettings) – settings controlling the map render
settings (QgsTemporalUtils.AnimationExportSettings) – animation and export settings
feedback (
QgsFeedback
= None) – optional feedback object for progress reports and cancellation checks
- Return type
Tuple[bool, str]
- Returns
True
if the export was successful.error: will be set to a descriptive error message if the export fails