pytuflow.CrossSections#
- class CrossSections(fpath)#
Bases:
TabularOutputClass for reading TUFLOW cross-section input layers.
This class does not need to be explicitly closed as it will load the results into memory and closes any open files after initialisation.
Only the attribute information is extracted from the cross-section GIS layer, therefore GDAL is not required to be installed to use this class as the supported formats (MIF, SHP, GPKG) all use common database formats to store the attribute information.
- Parameters:
fpath (PathLike) – The path to the cross-section GIS Layer (i.e.
1d_xslayer).- Raises:
ResultTypeError – Raises
pytuflow.results.ResultTypeErrorif the file does not look like aCrossSectionfile.
Examples
Load a cross-section layer:
>>> from pytuflow import CrossSections >>> xs = CrossSections('path/to/1d_xs.shp')
- __init__(fpath)#
- Parameters:
fpath (Path | str)
Methods
Not supported for
CrossSectionresults.Returns the cross-section types within the filter from the cross-section layer.
Returns the IDs within the filter from the cross-section layer.
Not supported for
CrossSectionresults.Return the cross-section data for given location and cross-section type.
Not supported for
CrossSectionresults.CrossSections results are static and will not return any times.
Attributes
The path to the source output file.
List of loaded cross-sections.
DataFrame of cross-sections information.
Number of cross-sections
The result name
The reference time for the output