pytuflow.GPKGRL#
- class GPKGRL(fpath)#
Bases:
GPKG2D
Class for handling RL GeoPackage time series results (
.gpkg
- typically ending with_RL.gpkg
). The GPKG time series format is a specific format published by TUFLOW built on the GeoPackage standard.This class can be used to initialise stand-alone GPKG result files, however it is not required to be used if loading GPKG results via the
TPC
class which will load all domains automatically (i.e.GPKG1D
,GPKG2D
,GPKGRL
).The
GPKGRL
class will only load basic properties on initialisation. These are typically properties that are easy to obtain from the file without having to load any of the time-series results. Once a method requiring more detailed information is called, the full results will be loaded. This makes theGPKGRL
class very cheap to initialise.- Parameters:
fpath (PathLike) – The path to the output (.gpkg) file.
- Raises:
ResultTypeError – Raises
pytuflow.results.ResultTypeError
if the file does not look like aGPKGRL
file.
Examples
>>> from pytuflow import GPKGRL >>> res = GPKGRL('path/to/GPKG_RL.gpkg')
Querying all the available data types:
>>> res.data_types() ['flow', 'water level', 'volume']
Querying all RL IDs:
>>> res.ids() ['rl_point', 'rl_line', 'rl_poly']
Getting the water level time series from the RL point
rl_point
:>>> res.time_series('rl_point', 'water level') time rl/water level/rl_point 0.000000 NaN 0.016667 NaN 0.033333 NaN 0.050000 NaN 0.066667 NaN ... ... 2.933333 40.147 2.950000 40.133 2.966667 40.116 2.983334 40.101 3.000000 40.084
- __init__(fpath)#
- Parameters:
fpath (Path | str)
Methods
Not supported for
GPKGRL
results.Returns all the available data types (result types) for the given filter.
Returns all the available IDs for the given filter.
Returns a DataFrame containing the maximum values for the given data types.
Not supported for
GPKGRL
results.Not supported for
GPKGRL
results.Returns a time-series DataFrame for the given location(s) and data type(s).
Returns all the available times for the given filter.
Attributes
The path to the source output file.
The unit system used in the output file.
the format version
The result name
The reference time for the output
PO/2D output objects.
RL output objects.
Number of 2d points
Number of 2d lines
Number of 2d polys
Number of reporting location points
Number of reporting location lines
Number of reporting location polys