pytuflow.GPKG2D.ids#
- GPKG2D.ids(filter_by=None)#
Returns all the available IDs for the given filter.
The
filter_by
argument can be used to add a filter to the returned IDs. Available filters for theGPKG2D
class are:None
: default - returns all available timespoint
:line
:polygon
: (orregion
)[data_type]
: returns only IDs for the given data type. Shorthand data type names can be used.
- Parameters:
filter_by (str, optional) – The string to filter the IDs by.
- Returns:
The available IDs.
- Return type:
list[str]
Examples
The below examples demonstrate how to use the
filter_by
argument to filter the returned IDs. The first example returns all IDs:>>> res = GPKG2D('path/to/plot_result_2D.gpkg') >>> res.ids() ['po_point', 'po_line', 'po_polygon']
Return only line IDs:
>>> res.ids('line') ['po_line']
Return IDs that have water level results:
>>> res.ids('h') ['po_point']