0

I am trying to use the TimeManager plugin in QGIS 3.16.1. I have successfully used this plugin in the past, but I'm running into some odd problems now that I can't figure out.

I have a geopackage layer with data that looks like this:

fid statefp countyfp geoid ... date count
1 36 001 36001 ... 2020-12-10 1

I'm adding this layer to TimeManager, selecting the date column for the "Start time", leaving everything else at the defaults. After clicking the "Add" button, I change the "Time Format" for for the layer from "WILL BE INFERRED" to "%Y-%m-%d" to match the format of dates in the layer.

If I then click "OK" to close the settings window, then re-open it, the layer I just added is gone.

There are no errors, either displayed on screen or in the log.

It seems unhappy with the date field in particular:

  • If I select another field (e.g. fid) as the date field, the layer is added persistently.
  • If I then change the name of the date field back to date, it disappears.
  • Date-based filters applied directly to the layer work just fine (i.e., I can set the filter to "date" > '2020-12-01' and it filters as expected).

What's going on here?

5
  • Are there some empty values in the date fields - ore some dates that otherwise could cause a problem? I earlier had similar problems - if just one date is not OK, the plugin will not accept this field as a date input. As you are in QGIS 3.16 - did you try the new temporal controller?
    – Babel
    Dec 11, 2020 at 11:22
  • I just discovered the temporal controller this morning, which is also acting weird. E.g., if I select "Single Field with Date/Time", the "Field" menu is completely empty. I can't select any field.
    – larsks
    Dec 11, 2020 at 11:49
  • so something about the values of your dates is not correct
    – Babel
    Dec 11, 2020 at 11:51
  • It turns out the temporal controller really wants a field fo type datetime, which I was able to resolve by just creating a virtual field of the appropriate type. But the temporal controller seems to be much less performant than the TimeManager plugin.
    – larsks
    Dec 11, 2020 at 22:31
  • Temporal controller is relatively new, so let's hope that it will enhance in the future. In my experience, working with temporal controller is easier than with TimeManager. With both tools, you need properly formatted dates
    – Babel
    Dec 11, 2020 at 22:48

1 Answer 1

1

I finally figured out what was going on.

The layer to which I'm applying TimeManager is the result of a "Join attributes by field value" operation. It looks as if there are a few features in one layer that result in NULL values in the joined layer.

The TimeManager plugin will drop the layer without any emitting any errors in this situation.

The solution in this case was to ensure the "Discard records which could not be joined" checkbox is checked; with this change, all the records in the resulting layer have a valid date attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.