Class: QgsRasterLayerTemporalProperties¶
Implementation of map layer temporal properties for raster layers.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Base class for storage of map layer temporal properties.  | 
|
Base class for temporal property.  | 
|
Enums
alias of   | 
Methods
Returns the band corresponding to the specified range.  | 
|
Returns the band number from which temporal values should be taken.  | 
|
Returns a filtered list of bands which match the specified range.  | 
|
Returns the fixed temporal range for each band.  | 
|
Returns the fixed temporal range for the layer.  | 
|
Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.  | 
|
Returns the temporal properties mode.  | 
|
Sets the band number from which temporal values should be taken.  | 
|
Sets the fixed temporal range for each band.  | 
|
Sets a temporal range to apply to the whole layer.  | 
|
Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.  | 
|
Sets the temporal properties mode.  | 
|
Sets the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.  | 
|
Sets the scale, which is an interval factor which should be applied to individual pixel values from the layer.  | 
|
Returns the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.  | 
|
Returns the scale, which is an interval factor which should be applied to individual pixel values from the layer.  | 
- class qgis.core.QgsRasterLayerTemporalProperties[source]¶
 Bases:
QgsMapLayerTemporalProperties- __init__(parent: QObject | None = None, enabled: bool = False)
 Constructor for QgsRasterLayerTemporalProperties, with the specified
parentobject.The
enabledargument specifies whether the temporal properties are initially enabled or not (seeisActive()).- Parameters:
 parent (Optional[QObject] = None)
enabled (bool = False)
- TemporalMode¶
 alias of
RasterTemporalMode
- bandForTemporalRange(self, layer: QgsRasterLayer | None, range: QgsDateTimeRange) int[source]¶
 Returns the band corresponding to the specified
range.Note
This is only considered when
mode()isQgis.RasterTemporalMode.FixedRangePerBand. For other modes it will always return -1.Added in version 3.38.
- Parameters:
 layer (Optional[QgsRasterLayer])
range (QgsDateTimeRange)
- Return type:
 int
- bandNumber(self) int[source]¶
 Returns the band number from which temporal values should be taken.
See also
Added in version 3.38.
- Return type:
 int
- filteredBandsForTemporalRange(self, layer: QgsRasterLayer | None, range: QgsDateTimeRange) List[int]¶
 Returns a filtered list of bands which match the specified
range.Added in version 3.38.
- Parameters:
 layer (Optional[QgsRasterLayer])
range (QgsDateTimeRange)
- Return type:
 List[int]
- fixedRangePerBand(self) Dict[int, QgsDateTimeRange]¶
 Returns the fixed temporal range for each band.
See also
Added in version 3.38.
- Return type:
 Dict[int, QgsDateTimeRange]
- fixedTemporalRange(self) QgsDateTimeRange¶
 Returns the fixed temporal range for the layer.
See also
- Return type:
 
- intervalHandlingMethod(self) Qgis.TemporalIntervalMatchMethod[source]¶
 Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.
See also
- Return type:
 
- mode(self) Qgis.RasterTemporalMode[source]¶
 Returns the temporal properties mode.
See also
- Return type:
 
- setBandNumber(self, number: int)[source]¶
 Sets the band number from which temporal values should be taken.
See also
Added in version 3.38.
- Parameters:
 number (int)
- setFixedRangePerBand(self, ranges: Dict[int, QgsDateTimeRange])[source]¶
 Sets the fixed temporal range for each band.
See also
Added in version 3.38.
- Parameters:
 ranges (Dict[int, QgsDateTimeRange])
- setFixedTemporalRange(self, range: QgsDateTimeRange)[source]¶
 Sets a temporal
rangeto apply to the whole layer. All bands from the raster layer will be rendered whenever the current datetime range of a render context intersects the specifiedrange.See also
- Parameters:
 range (QgsDateTimeRange)
- setIntervalHandlingMethod(self, method: Qgis.TemporalIntervalMatchMethod)[source]¶
 Sets the desired
methodto use when resolving a temporal interval to matching layers or bands in the data provider.See also
- Parameters:
 method (Qgis.TemporalIntervalMatchMethod)
- setMode(self, mode: Qgis.RasterTemporalMode)[source]¶
 Sets the temporal properties
mode.See also
- Parameters:
 mode (Qgis.RasterTemporalMode)
- setTemporalRepresentationOffset(self, offset: QDateTime | datetime.datetime)[source]¶
 Sets the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.
See also
Added in version 3.38.
- Parameters:
 offset (Union[QDateTime, datetime.datetime])
- setTemporalRepresentationScale(self, scale: QgsInterval)[source]¶
 Sets the scale, which is an interval factor which should be applied to individual pixel values from the layer.
See also
Added in version 3.38.
- Parameters:
 scale (QgsInterval)
- temporalRepresentationOffset(self) QDateTime[source]¶
 Returns the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.
See also
Added in version 3.38.
- Return type:
 QDateTime
- temporalRepresentationScale(self) QgsInterval¶
 Returns the scale, which is an interval factor which should be applied to individual pixel values from the layer.
See also
Added in version 3.38.
- Return type: