onstove.OnStove.distance_to_electricity#
- OnStove.distance_to_electricity(hv_lines: VectorLayer = None, mv_lines: VectorLayer = None, transformers: VectorLayer = None)[source]#
Calculates the distance to electricity infrastructure.
It calls the
VectorLayer.get_distance_raster()
method for the high voltage, medium voltage and transformers datasets (if available) and converts the output to a column in the main GeoDataFrame (gdf
).Warning
The
name
attribute of the input datasets must be HV_lines, MV_lines and Transformers. This naming convention may change in future releases.- Parameters:
- hv_lines: VectorLayer
High voltage lines dataset.
- mv_lines: VectorLayer
Medium voltage lines dataset.
- transformers: VectorLayer
Transformers dataset.