transmission-layer-creator
Transmission LCP routing cost, friction, and barrier layer creator.
Usage
transmission-layer-creator [OPTIONS] COMMAND [ARGS]...
Options
- --version
Show the version and exit.
- -v, --verbose
Flag to turn on debug logging. Default is not verbose.
convert-pois
Convert points of interconnection (POI) to short lines. The transmission routing code requires all transmission elements to be lines. The POIs defined in the CSV will be converted to lines and labeled as substations. As all substations must be link to a transmission line, a synthetic transmission line is created that is linked to the POIs.
Usage
transmission-layer-creator convert-pois [OPTIONS]
Options
- -p, --poi-file <poi_file>
Required File of POIs in CSV format. Each POI must have the following fields: “POI Name”, “State”, “Voltage (kV)”, “Lat”, and “Long”. “State” may be blank. Other fields are ignored.
- -t, --template-raster <template_raster>
Required Raster to extract CRS from.
- -o, --out-file <out_file>
Required Filename to use for POI lines GeoPackage file.
create-h5
Create a new H5 file to store layers in.
Usage
transmission-layer-creator create-h5 [OPTIONS]
Options
- -t, --template-raster <template_raster>
Required Raster to extract CRS, transform, and shape from.
- -h, --h5-file <h5_file>
Required Name of H5 file to create.
- -bs, --block_size <block_size>
Block size used to build lat/lon datasets.
create-masks
Convert a vector land file to wet, dry, and all other masks.
Usage
transmission-layer-creator create-masks [OPTIONS]
Options
- -l, --land-mask-vector <land_mask_vector>
Required GeoPackage or shapefile representing land.
- -t, --template-raster <template_raster>
Required Raster to extract CRS, transform, and shape from.
- -m, --masks-dir <masks_dir>
Directory to store mask GeoTIFFs in.
- -d, --dont-reproject
Don’t reproject vector before creating masks.
from-config
Create costs, barriers, and frictions from a config file.
Usage
transmission-layer-creator from-config [OPTIONS]
Options
- -c, --config <config_fpath>
Required Configuration JSON.
Dataset Attributes
The from-config command accepts optional attrs fields in its JSON
configuration. Each entry in layers and merge_friction_and_barriers
accepts an attribute dictionary for its output HDF5 dataset. dry_costs
accepts a mapping of HDF5 dataset names to attribute dictionaries, allowing
different metadata for each generated or imported layer:
{
"layers": [
{
"layer_name": "friction",
"description": "Routing friction",
"build": {"friction.tif": {"pass_through": true}},
"attrs": {"source": "survey", "year": 2026}
}
],
"dry_costs": {
"iso_region_tiff": "regions.tif",
"nlcd_tiff": "nlcd.tif",
"slope_tiff": "slope.tif",
"attrs": {
"regions": {"source": "ISO boundaries"},
"dry_multipliers": {"units": "multiplier"},
"tie_line_costs_100MW": {"units": "USD/cell"}
}
},
"merge_friction_and_barriers": {
"friction_layer": "friction",
"barrier_layer": "barriers",
"attrs": {"source": "Combined routing constraints"}
}
}
This fragment supplements the normal required paths, including
template_raster_fpath and h5_fpath. Dry-cost input and extra_tiffs
dataset names are their filename stems, without directories or extensions.
Generated layers use dry_multipliers and tie_line_costs_<capacity>MW.
Base-line-cost GeoTIFFs are not written to HDF5 and cannot receive dataset
attributes. Layers omitted from the mapping receive no additional attributes.
The Python APIs LayerCreator.build and DryCostCreator.build accept
the same optional attrs inputs. Attributes apply only to HDF5 datasets, not the
GeoTIFF output, and layers with include_in_h5: false are not written to HDF5.
Values must be supported by HDF5 attributes, such as strings, numbers, and
homogeneous lists. Metadata is passed through to the underlying writer;
attribute names that overlap writer-generated metadata follow that writer’s
precedence rules.