pytuflow.LP2D.ids#
- LP2D.ids(filter_by=None)#
Returns all the available IDs for the given filter.
The chainages along the 2d_lp line will each be given a unique ID based on the name of the 2d_lp line. If a GIS file is provided, the label will be extracted from the “label” field. If no GIS file is provided, the line label cannot be determined, so the file name excluding the data type is used.
Point IDs will be made up as
[label]_[offset]_pnt[index].The
filter_byargument can be used to add a filter to the returned IDs. Available filters objects for theLP2Dclass are:None: default - returns all IDs2d: same asNoneas class only contains 2D datanode/point: returns only point IDsnodestring/line: returns only line IDstimeseries: returns only IDs that have time series data (same aspointfor theLP2Dclass).section: returns only IDs that have section data (i.e. long plot data - same aslinefor theLP2Dclass).[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
>>> lp = LP2D('/path/to/model_LP_NAME_H.csv') >>> lp.ids() ['EG02_012_LP_01_2.07_pnt0', 'EG02_012_LP_01_8.31_pnt1', 'EG02_012_LP_01_14.55_pnt2', ..., 'EG02_012_LP_01']