How fryktoria/on-the-fly-shortest-path works
This QGIS plugin lets users measure routes interactively on a line network, optionally guiding the route through middle points, and reports distance plus a fiber-loss budget. The central plugin controller connects map interactions, route calculation, visualization, configuration, and results. The README documents Dijkstra-based routing and loss parameters; the supplied excerpts do not show the complete calculation or dialog wiring, so those links are shown only where documented or marked unverified.
Main entry points: onthefly_shortest_path.py Plugin controller · ui_Classes.py Dialog wrappers · flexjLineTool.py Route drawing tool · geometry.py Distance measurement
Components 23
Map interaction
- Plugin controller
onthefly_shortest_path.py - Snapping tool
vertexTool.py - Route drawing tool
flexjLineTool.py - Middle-point tool
onthefly_shortest_path.py - Bridge-point tool
bridgingPointTool.py - Bridge-line tool
bridgingLineTool.py - Line visualization
flexjLine.py
Route and geometry
- Shortest-path calculation
onthefly_shortest_path.py - Network bridging
bridge.py - CRS and geometry
geometry.py
Measurement and loss
- Distance measurement
geometry.py - Fiber loss budget
onthefly_shortest_path.py - Loss profiles
profiles/loss_profiles.json
Plugin interface
- Configuration dialog
ui_DlgConfiguration.py - Layer selection dialog
ui_DlgLayerSelection.py - Marker coordinates dialog
ui_DlgMarkerCoordinates.py - Fiber results dialog
ui_DlgResults.py - Distance results dialog
ui_DlgResultsNoFiber.py - Dialog wrappers
ui_Classes.py - Dock widget UI
ui_DlgDockWidget.py
Other components
- QGIS user
- QGIS map canvas
- QGIS Network Analysis
Connections 31
- QGIS user → QGIS map canvas: selects map points
README.md - QGIS map canvas → Plugin controller: delivers map input
- Plugin controller → Shortest-path calculation: requests route
onthefly_shortest_path.py - Shortest-path calculation → QGIS Network Analysis: uses Dijkstra
README.md - Plugin controller → Route drawing tool: configures drawing
onthefly_shortest_path.py - Plugin controller → Snapping tool: configures snapping
onthefly_shortest_path.py - Plugin controller → Middle-point tool: accepts waypoints
README.md - Plugin controller → Bridge-point tool: coordinates point bridging
onthefly_shortest_path.py - Plugin controller → Bridge-line tool: coordinates line bridging
onthefly_shortest_path.py - Route drawing tool → Snapping tool: inherits snapping
flexjLineTool.py - Route drawing tool → Line visualization: adds route points
flexjLineTool.py - Bridge-line tool → Line visualization: draws bridge lines
bridgingLineTool.py - Bridge-point tool → Snapping tool: inherits snapping
bridgingPointTool.py - Network bridging → CRS and geometry: uses geometry helper
bridge.py - Plugin controller → Network bridging: prepares network bridging
onthefly_shortest_path.py - Shortest-path calculation → Distance measurement: measures route
onthefly_shortest_path.py - Distance measurement → CRS and geometry: uses CRS measurements
geometry.py - Shortest-path calculation → Fiber loss budget: provides route
onthefly_shortest_path.py - Fiber loss budget → Loss profiles: loads profile values
- Fiber loss budget → Fiber results dialog: reports loss budget
- Distance measurement → Distance results dialog: reports distance
- Plugin controller → Configuration dialog: opens configuration
- Plugin controller → Layer selection dialog: selects network layers
onthefly_shortest_path.py - Plugin controller → Marker coordinates dialog: sets marker coordinates
- Plugin controller → Dialog wrappers: uses dialog wrappers
onthefly_shortest_path.py - Dialog wrappers → Configuration dialog: wraps dialog
ui_Classes.py - Dialog wrappers → Layer selection dialog: wraps dialog
ui_Classes.py - Dialog wrappers → Marker coordinates dialog: wraps dialog
ui_Classes.py - Dialog wrappers → Fiber results dialog: wraps dialog
ui_Classes.py - Dialog wrappers → Distance results dialog: wraps dialog
ui_Classes.py - Plugin controller → Dock widget UI: uses dock controls