onstove.VectorLayer.travel_time#

VectorLayer.travel_time(friction: RasterLayer | None = None, output_path: str | None = None, create_raster: bool | None = True) RasterLayer[source]#

Creates a travel time map to the nearest polygon in the layer using a friction surface.

It calculates the minimum time needed to travel to the nearest point defined by the current VectorLayer using a surface friction RasterLayer. The friction dataset, describes how much time, in minutes, is needed to travel one meter across each cell over the region.

Parameters:
friction: RasterLayer, optional

Surface friction layer in minutes per minute traveled across each cell over a region.

output_path: str, optional

A folder path where to save the output dataset. If not defined then the travel time dataset is not saved.

create_raster: bool, default True

Boolean condition. If True, a RasterLayer will be created and stored in the distance_raster attribute of the class. If False, a RasterLayer with the travel time calculation is returned.

Returns:
RasterLayer

RasterLayer with the travel time to the nearest polygon in the current VectorLayer.

Notes

For more information on surface friction layers see the Malarian Atlas Project.