pytuflow.DATCrossSections#
- class DATCrossSections(fpath, driver=None)#
Bases:
TabularOutputClass for reading Flood Modeller cross-sections from the .dat format.
- Parameters:
fpath (PathLike) – The path to the
.datfile.driver (Any)
- Raises:
ResultTypeError – Raises
pytuflow.results.ResultTypeErrorif the file does not look like a Flood Modeller.datfile.
Examples
Load a cross-section layer:
>>> from pytuflow import DATCrossSections >>> xs = DATCrossSections('path/to/model.dat')
Access the cross-section IDs:
>>> xs.ids() ['US_1', 'US_2', 'US_3', 'DS_1', 'DS_2', 'DS_3', 'DS_4']
Access the cross-section data for a given location:
>>> xs.section('US_1', ['xz', 'n']) US_1 x z manning n 0 0.0 99.0 0.001 1 0.0 98.0 0.001 2 5.0 98.0 0.001 3 5.0 99.0 0.001
- __init__(fpath, driver=None)#
- Parameters:
fpath (Path | str)
driver (Any)
Methods
Not supported for
CrossSectionresults.Returns the cross-section types.
Returns the IDs from the cross-section layer.
Not supported for
CrossSectionresults.Return the cross-section data for given location and cross-section data type.
Not supported for
CrossSectionresults.CrossSections results are static and will not return any times.
Attributes
List of loaded cross-sections.
The path to the source output file.
DataFrame of cross-sections information.
Number of cross-sections
The result name
Does the result have an inherent reference time.
The reference time for the output