pytuflow.GPKG2D.data_types

pytuflow.GPKG2D.data_types#

GPKG2D.data_types(filter_by=None)#

Returns all the available data types (result types) for the given filter.

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

  • None: default - returns all available times

  • point:

  • line:

  • polygon: (or region)

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

Parameters:

filter_by (str, optional) – The string to filter the data types by.

Returns:

The available data types.

Return type:

list[str]

Examples

The below examples demonstrate how to use the filter_by argument to filter the returned data types. The first example returns all data types:

>>> res = GPKG2D('path/to/plot_result_2D.gpkg')
>>> res.data_types()
['water level', 'flow', 'velocity']

Returning only the point data types:

>>> res.data_types('point')
['water level', 'velocity']

Return only data types for the channel FC01.1_R:

>>> res.data_types('po_point')
['water level']