pytuflow.CrossSections.data_types

pytuflow.CrossSections.data_types#

CrossSections.data_types(filter_by=None)#

Returns the cross-section types within the filter from the cross-section layer. Types refer to the cross-section type e.g. xz, hw, cs, bg, lc.

Available filters are:

  • None - returns all available types.

  • [id] - returns all types of the given ID.

  • [source] - returns all types present in the given source file.

Parameters:

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

Returns:

List of types.

Return type:

list[str]

Examples

Return all the cross-section types in the layer:

>>> xs = CrossSections('/path/to/1d_xs.shp')
>>> xs.data_types()
['xz', 'hw']

If multiple cross-section tables are present in a given CSV file, the cross-section types from a given file can be obtained:

>>> xs.data_types('/path/to/1d_CrossSection.csv')
['xz']