revrt.utilities.cli.ss_from_conn#
- ss_from_conn(connections_fpath, out_fpath, region_identifier_column=None, batch_size=10000)[source]#
Extract substations from connections table output by LCP.
Substations extracted by this method can be used for reinforcement calculations.
This method also does minor filtering/formatting of the input connections table.
Reinforcement regions are user-defined. Typical regions are Balancing Areas, States, or Counties, though custom regions are also allowed. Each region must be supplied with a unique identifier in the input file.
Important
This method DOES NOT clip the substations to the reinforcement regions boundary. All substations will be mapped to their closest region. It is your responsibility to remove any substations outside of the analysis region before calling this method.
Doing the pre-processing step avoids any issues with substations being left out or double counted if they were simply clipped to the reinforcement region shapes.
- Parameters:
connections_fpath (path-like) – Path to GeoPackage with substation and transmission features.
out_fpath (path-like, optional) – Name for output GeoPackage file.
region_identifier_column (
str, optional) – Name of column in reinforcement regions GeoPackage containing a unique identifier for each region. IfNone, no column is ported. By default,None.batch_size (
int, default10_000) – Number of records to load into memory at once when extracting substations. By default,10_000.
- Raises:
revrtValueError – If batch_size is not a positive integer or if the connections file does not end with ‘.csv’ or ‘.gpkg’.