QGIS 3.14
Old version:
for i, layer in enumerate(QgsProject.instance().mapLayers().values()):
if isinstance(layer, QgsRasterLayer):
mode = QgsRasterLayerTemporalProperties.ModeFixedTemporalRange
tprops = layer.temporalProperties()
tprops.setFixedTemporalRange(QgsDateTimeRange(QDateTime(QDate(2020, 1, 1), QTime(1, i, 0, 0), Qt.UTC),
QDateTime(QDate(2020, 1, 1), QTime(1, 1+i, 0, 0), Qt.UTC)))
tprops.setMode(mode)
tprops.setIsActive(True)
1 Comment
Diego Flores · at
Hello, I want to know how to perform a time cut of a data set. I want these data that have different dates, stay for example, 14 days in a row, and then they stop showing up. In the attribute table, each point has a start date. As the data set is very extensive and is updated daily, I just want to tell the Temporal Controller how long the data will stay from the start date column. Do I do this in the “Expression” tool? How would it be?
Thank you!