pytuflow.GPKGRL.times

Contents

pytuflow.GPKGRL.times#

GPKGRL.times(filter_by=None, fmt='relative')#

Returns all the available times for the given filter.

The filter_by is an optional argument that can be used to filter the return further.Available filters for the GPKGRL class are:

  • None: default - returns all available times

  • point:

  • line:

  • polygon: (or region)

  • [id]: returns only data types for the given ID.

  • [data_type]: returns only data types for the given data type. Shorthand data type names can be used.

Parameters:
  • filter_by (str, optional) – The string to filter the times by.

  • fmt (str, optional) – The format for the times. Options are relative or absolute.

Returns:

The available times in the requested format.

Return type:

list[TimeLike]

Examples

>>> res = GPKGRL('/path/to/plot_results_RL.gpkg')
>>> res.times()
[0.0, 0.016666666666666666, ..., 3.0]
>>> res.times(fmt='absolute')
[Timestamp('2021-01-01 00:00:00'), Timestamp('2021-01-01 00:01:00'), ..., Timestamp('2021-01-01 03:00:00')]