v1.0.2
-
Multi-profile routing (car, motorcycle, bicycle) and toll avoidance.
-
lib/src/osm/vehicle_profile.dart(new):- Added
VehicleProfile, controlling how source tags (routable highway classes,
access, speed, one-way) are interpreted per transport mode. - Bundled
VehicleProfile.car,.motorcycle, and.bicycle. Bicycles route over
cycleways/paths, exclude motorways/trunks, ignore motor-vehicle one-way rules
(but honoroneway:bicycle), and travel at a flat, capped speed.
- Added
-
lib/src/osm/osm_converter.dart:OsmConverternow takes aprofile(defaultVehicleProfile.car); routability,
access, speed and one-way interpretation are driven by it. Build one graph per
profile and store each under a profile-scoped id.- Parses the
tolltag and flags toll segments on emitted edges.
-
lib/src/routing/route_finder.dart:- Added
avoidTollstofindRoute/findRoutes. Toll roads are heavily (but
finitely) penalized via the uniform penalty-Dijkstra, so toll-free routes are
preferred while a tolled route is still returned when unavoidable.
- Added
-
lib/src/model/geo_route.dart:GeoRoutenow reportstollCount(toll sections crossed) and ahasTolls
getter, so thefindRoutesresult can be filtered into toll-free vs tolled
routes.GeoRouteimplementsComparable: sorting a route list orders it by fewest
tolls first, then shortest distance (not-found routes sort last).
-
Model/graph/serialization:
GeoEdge.tolls(anintcount, with ahasTollgetter),RoutingGraph.adjToll
(+isToll/tollsOf), propagated throughGraphBuilderandGraphCompressor
(a merged chain sums the toll counts of its collapsed segments).- Breaking on-disk change: graph format bumped to v2 to store
adjToll; graphs
written by earlier versions must be rebuilt.