[QGIS-Developer] Temporal controller issues

Nyall Dawson nyall.dawson at gmail.com
Thu Jan 7 15:53:43 PST 2021


On Thu, 7 Jan 2021 at 15:38, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>
> > For example, one can add all sorts of SQL-like filters to a layer datasource (which was how the TimeManager plugin worked, if I understand correctly) and the selection tool, vertex tool, and so on are not broken by that. When somebody turns on the NTC, it is reasonable for them to expect that the filtering it does would act in a similar manner to those SQL-like filters added manually to a layer, yes?
>
> Time manager indeed piggy backed onto the layer sql filter
> functionality to implement time filtering. This had some advantages in
> that the temporal filtering became an innate property of the layer,
> but it was ultimately a dead end. There were issues with using the
> layer filter which couldn't be resolved, including:
> - poor UX -- users could not edit the layer filter while time manager
> was active, as the changes would either break time manager's temporal
> filter or would get immediately discarded as soon as time manager
> changed the temporal part of the filter.
> - constant fighting with time formats, and provider-specific support:
> because layer sql filters are handed directly off to the underlying
> backend, their syntax varies provider by provider. This means that the
> time manager approach becomes a tricky/fragile balancing act of
> provider-specific filter clauses. This also led to the requirement of
> strict time format constraints, which again varied provider by
> provider (and sometimes even locale by locale). While that's fine for
> a plugin, we wanted to ensure that time handling in qgis core was as
> seamless and pain-free as possible, and would work transparently
> across all data sources. Thus a different approach was required.

Bah, I realised I forget THE most important point here:
- Layer based filters are universal, and apply everywhere in QGIS.
Using them for temporal filtering would mean it's impossible to have
different views of the layer showing different time ranges (e.g one
map canvas filtered to a certain time range and another showing all
data, or different layout maps showing different slices of temporal
data, e.g. a print layout with a map for January, February, etc). The
final approach used ensures that we can flexibly control the time
range per map render, so we're free to have a different time range
visible in a 2d map vs a 3d map vs a print layout map.

Nyall


More information about the QGIS-Developer mailing list