reVX.least_cost_xmission.layers.friction_barrier_builder.FrictionBarrierBuilder
- class FrictionBarrierBuilder(io_handler: LayeredTransmissionH5, masks: Masks, output_tiff_dir='.', dtype: dtype[Any] | None | Type[Any] | _SupportsDType[dtype[Any]] | str | Tuple[Any, int] | Tuple[Any, SupportsIndex | Sequence[SupportsIndex]] | List[Any] | _DTypeDict | Tuple[Any, Any] = 'float32')[source]
Bases:
LayerCreator
Build friction or barrier layers.
- Parameters:
io_handler (
LayeredTransmissionH5
) – Transmission layer IO handlermasks (Masks) – Masks instance that can be used to retrieve multiple types of masks.
output_tiff_dir (path-like, optional) – Directory where cost layers should be saved as GeoTIFF. By default,
"."
.dtype (np.dtype, optional) – Data type for final dataset. By default,
float32
.
Methods
build
(kind, layers)Combine multiple GeoTIFFs and vectors to create a friction or barrier layer and save to GeoTIFF.
Attributes
Layer shape.
- build(kind: Literal['friction', 'barrier'], layers: Dict[str, FBLayerConfig])[source]
Combine multiple GeoTIFFs and vectors to create a friction or barrier layer and save to GeoTIFF.
- Parameters:
kind ({‘friction’, ‘barrier’}) – Type of layer being built
layers (dict) – Dict of FBLayerConfigs keyed by GeoTIFF/vector filenames.