revrt.routing.base.RouteMetrics#
- class RouteMetrics(routing_layers, route, optimized_objective, add_geom=False, attrs=None)[source]#
Bases:
objectClass to compute route characteristics given layer cost maps
- Parameters:
routing_layers (
RoutingLayerManager) – Routing layer manager containing cost and tracker arrays.route (
list) – Ordered row and column indices defining the path.optimized_objective (
float) – Objective value returned by the routing solver.add_geom (
bool, defaultFalse) – Include shapely geometry in the output whenTrue. By default,False.attrs (
dict, optional) – Additional metadata merged into the result dictionary. By default,None.
Methods
compute()Assemble route metrics and optional geometry payload
Attributes
Raster cell size in meters
Optimized objective evaluated over the route
Latitude of the terminal path cell
Longitude of the terminal path cell
Geometry for the computed path
Total path length in kilometers
- property geom#
Geometry for the computed path
- Type: