Class: QgsRasterLayerTemporalProperties¶
- class qgis.core.QgsRasterLayerTemporalProperties¶
Bases:
QgsMapLayerTemporalProperties
Implementation of map layer temporal properties for raster layers.
Added in version 3.14.
QgsRasterLayerTemporalProperties(parent: QObject = None, enabled: bool = False) Constructor for
QgsRasterLayerTemporalProperties
, with the specifiedparent
object.The
enabled
argument specifies whether the temporal properties are initially enabled or not (seeisActive()
).Enums
alias of
RasterTemporalMode
Methods
- param layer:
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 flags associated to the temporal property.
Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.
- param range:
Returns the temporal properties mode.
- param element:
Sets the band number from which temporal values should be taken.
- param capabilities:
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.
- param element:
- TemporalMode¶
alias of
RasterTemporalMode
- allTemporalRanges(self, layer: QgsMapLayer) List[QgsDateTimeRange] ¶
- Parameters:
layer (QgsMapLayer)
- Return type:
List[QgsDateTimeRange]
- bandForTemporalRange(self, layer: QgsRasterLayer, range: QgsDateTimeRange) int ¶
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 (QgsRasterLayer)
range (QgsDateTimeRange)
- Return type:
int
- bandNumber(self) int ¶
Returns the band number from which temporal values should be taken.
See also
Added in version 3.38.
- Return type:
int
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- filteredBandsForTemporalRange(self, layer: QgsRasterLayer, range: QgsDateTimeRange) List[int] ¶
Returns a filtered list of bands which match the specified
range
.Added in version 3.38.
- Parameters:
layer (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:
- flags(self) QgsTemporalProperty.Flags ¶
Returns flags associated to the temporal property.
- Return type:
- intervalHandlingMethod(self) Qgis.TemporalIntervalMatchMethod ¶
Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.
See also
- Return type:
- isSignalConnected(self, QMetaMethod) bool ¶
- isVisibleInTemporalRange(self, range: QgsDateTimeRange) bool ¶
- Parameters:
range (QgsDateTimeRange)
- Return type:
bool
- mode(self) Qgis.RasterTemporalMode ¶
Returns the temporal properties mode.
See also
- Return type:
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setBandNumber(self, number: int)¶
Sets the band number from which temporal values should be taken.
See also
Added in version 3.38.
- Parameters:
number (int)
- setDefaultsFromDataProviderTemporalCapabilities(self, capabilities: QgsDataProviderTemporalCapabilities)¶
- Parameters:
capabilities (QgsDataProviderTemporalCapabilities)
- setFixedRangePerBand(self, ranges: Dict[int, QgsDateTimeRange])¶
Sets the fixed temporal range for each band.
See also
Added in version 3.38.
- Parameters:
ranges (Dict[int)
- setFixedTemporalRange(self, range: QgsDateTimeRange)¶
Sets a temporal
range
to 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)¶
Sets the desired
method
to 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)¶
Sets the temporal properties
mode
.See also
- Parameters:
mode (Qgis.RasterTemporalMode)
- setTemporalRepresentationOffset(self, offset: QDateTime | datetime.datetime)¶
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)
- setTemporalRepresentationScale(self, scale: QgsInterval)¶
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 ¶
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:
- timerEvent(self, QTimerEvent)¶
- writeXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
- Parameters:
element (QDomElement)
doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
QDomElement