least-cost-paths
Least Cost Paths Command Line Interface
least-cost-paths [OPTIONS] COMMAND [ARGS]...
Options
- --version
Show the version and exit.
- -n, --name <name>
Job name.
- Default:
'LeastCostPaths'
- -v, --verbose
Flag to turn on debug logging. Default is not verbose.
add-rr-to-nn
Add reinforcement region column to network node file.
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.
least-cost-paths add-rr-to-nn [OPTIONS]
Options
- -nodes, --network_nodes_fpath <network_nodes_fpath>
Path to network nodes GeoPackage. The region_identifier_column will be added to this file if it is missing.
- -regs, --regions_fpath <regions_fpath>
Required Path to reinforcement regions GeoPackage. The region_identifier_column from this file will be added to the network_nodes_fpath if needed.
- -rid, --region_identifier_column <region_identifier_column>
Required Name of column in reinforcement regions GeoPackagecontaining a unique identifier for each region.
- -ctf, --crs_tempalate_file <crs_tempalate_file>
Path to a fiel containing the CRS that should be used to perform the mapping. This input can be an exclusions HDF5 file, a GeoTIFF, or any file tha can be read with GeoPandas. If None, the network_nodes_fpath file CRS is used to perfom the mapping.
- -of, --out_file <out_file>
Name for output GeoPackage file. If None, the network_nodes_fpath file will be overwritten.
from-config
Run Least Cost Paths from a config.
least-cost-paths from-config [OPTIONS]
Options
- -c, --config <config>
Required Filepath to AssemblyAreas config json file.
- -v, --verbose
Flag to turn on debug logging. Default is not verbose.
local
Run Least Cost Paths on local hardware
least-cost-paths local [OPTIONS]
Options
- -cost, --cost_fpath <cost_fpath>
Required Path to h5 file with cost rasters and other required layers
- -feats, --features_fpath <features_fpath>
Required Path to GeoPackage with transmission features
- -cl, --cost-layers <cost_layers>
Required Layer in H5 to add to total cost raster used for routing. Multiple layers may be specified. If running reinforcement computations, layer name may have curly brackets (
{}
), which will be filled in based on the capacity class input (e.g. “tie_line_costs_{}MW”)
- -nn, --network_nodes_fpath <network_nodes_fpath>
Path to Network Nodes GeoPackage. If given alongside transmission_lines_fpath, reinforcement path cost calculation is run.
- -tl, --transmission_lines_fpath <transmission_lines_fpath>
Path to Transmission lines GeoPackage. This file can contain other features, but transmission lines must be identified by ‘TransLine’. If given alongside network_nodes_fpath, reinforcement path cost calculation is run.
- -xcfg, --xmission_config <xmission_config>
Path to transmission config .json. Only used for reinforcement path computations.
- -cap, --capacity_class <capacity_class>
Capacity class of the ‘base’ greenfield costs layer. Costs will be scaled by the capacity corresponding to this class to report reinforcement costs as $/MW. Only used for reinforcement path computations.
- -cb, --clip_buffer <clip_buffer>
Optional number of array elements to buffer clip area by.
- Default:
0
- -start, --start_index <start_index>
Start index of features to run.
- Default:
0
- -step, --step_index <step_index>
Step index of features to run.
- Default:
1
- -tbln, --tb_layer_name <tb_layer_name>
Name of transmission barrier layer in cost_fpath file. This layer defines the multipliers applied to the cost layer to determine LCP routing (but does not actually affect output costs
- Default:
'transmission_barrier'
- -bmult, --barrier_mult <barrier_mult>
Transmission barrier multiplier, used when computing the least cost tie-line path
- Default:
100
- -mw, --max_workers <max_workers>
Number of workers to use for processing, if 1 run in serial, if None use all available cores
- -rid, --region_identifier_column <region_identifier_column>
Name of column in reinforcement regions GeoPackagecontaining a unique identifier for each region.
- -paths, --save_paths
Flag to save least cost path as a multi-line geometry
- -o, --out_dir <out_dir>
Directory to save least cost Paths values to.
- Default:
'./'
- -log, --log_dir <log_dir>
Directory to dump log files.
- -ssid, --ss_id_col <ss_id_col>
Name of column used to unqiuely identify substations. Used for reinforcement calcaultions only.
- Default:
'poi_gid'
- -v, --verbose
Flag to turn on debug logging. Default is not verbose.
- -licl, --li-cost-layers <li_cost_layers>
Length-invariant cost layer in H5 to add to total cost raster used for routing. These costs do not scale with distance traversed acroiss the cell. Multiple layers may be specified.
- -trl, --tracked_layers <tracked_layers>
Dictionary mapping layer names to strings, where the strings are numpy methods that should be applied to the layer along the LCP.
- -cs, --cell_size <cell_size>
Side length of a single cell in meters. Cells are assumed to be square. Default is
- Default:
90
map-ss-to-rr
Map substation locations to reinforcement regions.
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.
This method also removes substations that do not meet the min 69 kV voltage requirement and adds {‘min_volts’, ‘max_volts’} fields to the remaining substations.
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.
least-cost-paths map-ss-to-rr [OPTIONS]
Options
- -feats, --features_fpath <features_fpath>
Required Path to GeoPackage with substation and transmission features
- -regs, --regions_fpath <regions_fpath>
Required Path to reinforcement regions GeoPackage.
- -rid, --region_identifier_column <region_identifier_column>
Required Name of column in reinforcement regions GeoPackagecontaining a unique identifier for each region.
- -of, --out_file <out_file>
Name for output GeoPackage file.
ss-from-conn
Extract substations from connections table output by LCP.
Substations extracted by this method can be usef 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.
least-cost-paths ss-from-conn [OPTIONS]
Options
- -con, --connections_fpath <connections_fpath>
Required Path to GeoPackage with substation and transmission features
- -rid, --region_identifier_column <region_identifier_column>
Required Name of column in reinforcement regions GeoPackagecontaining a unique identifier for each region.
- -of, --out_file <out_file>
Required Name for output GeoPackage file.
valid-config-keys
Echo the valid Least Cost Paths config keys
least-cost-paths valid-config-keys [OPTIONS]