[QGIS-Developer] Temporal Controller: Select current visible features??
Richard Duivenvoorde
rdmailings at duif.net
Mon Mar 21 06:40:54 PDT 2022
Hi Dev's,
See also: https://github.com/qgis/QGIS/issues/47893
I'm trying to find a way to programmatically (only) select the current
visible features in a vector layer which is controlled by the Temporal
Controller.
As 'select by rectangle' in the gui works... I thought to use:
iface.mapCanvas().currentLayer().selectByRect(iface.mapCanvas().currentLayer().extent())
but that selects ALL features (not taking the Temporal Controller into
account).
Anybody aware of a way to do this?
Going to try to get the temporal expression maybe and then select by
expression?
I'm also wondering how we should conceptually view the Temporal
Controller: as a Filter or more as a sort of style/rendering thing.
Depending on that all selection tools should behave in the same way I
think?
Any input appreciated,
Regards,
Richard Duivenvoorde
PS context about why you would like to select the visible features: I'm
thinking about some kind of on the fly voronoi-ing of the point layer,
to have a heatmap-like polygon layer... Same would be needed to actually
create a heatmap (per timestep)...
More information about the QGIS-Developer
mailing list