osm_route — DRIVE japan op

• Data kinds: table → table

• Call: import fullseye as fs; fs.ledger.osm_route(graph: 'dict', src: 'int', dst: 'int', *, side: 'str' = 'left', step: 'float' = 0.5, lane_offset=None, signal_setback: 'float' = 1.0, crossing_setback: 'float' = 3.0) -> 'Dict[str, object]' (to call the implementation directly, import drivejapan; drivejapan.osm_route(graph: 'dict', src: 'int', dst: 'int', *, side: 'str' = 'left', step: 'float' = 0.5, lane_offset=None, signal_setback: 'float' = 1.0, crossing_setback: 'float' = 3.0) -> 'Dict[str, object]'; from the registry, opsdrive.get("osm_route"))

Usage

Turns the shortest path between 2 nodes (Dijkstra, respecting one-way streets) into a polyline along the lane center and lists the stop lines by arc length.

Lane centre = the edge centreline shifted toward the travel side (side) by width/4 (two-way road) or 0 (one-way) (override with lane_offset). At nodes, segments are joined using the mean of the adjacent normals (mitre). Stop lines (in the form read by drivetown.town_run {"s", "x", "y", "yaw", "kind", "node", "element"}):

traffic_signals nodes = "intersection" (signal_setback before the half-width of the crossing road = the edge of the intersection; the continuation of the same road is not counted), stop / give_way = "stop_sign" (same position), level_crossing = "crossing" (crossing_setback before it, crossing_zone = 1.5 m before and after the rails). The first node of the route is skipped. Returns {"kind": "route", "nodes", "edges", "polyline": (K,2), "cum": (K,), "length", "stop_lines", "side", "waypoints": (n,3) 節点の車線中心, "crosswalks": [s]}. Raises ValueError: no nodes, unreachable, invalid side.

Empty input (graph is an empty dict) raises ValueError.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_driving_japan_town — py -3.11 examples/poc_driving_japan_town.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (japan)

osm_synthetic · osm_parse · osm_road_graph · osm_road_mask · osm_road_loops · japan_world · japan_stats · latlon_to_local


*Provenance: drivejapan.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.