Please sign in to comment.
Added QgsTracer to support tracing in map tools
The tracer builds a graph from input layers and uses Dijkstra's algorithm for the shortest path in the graph. There is already QgsGraph class and friends in QGIS code including Dijkstra's algorithm, however that implementation does not fit our needs well for a number of reasons (some of them would be easy to fix, but others would require a significant rewrite): - limited to single input layer - no monitoring of changes in the input layers - no support for polygons - not in core library - shortest path alg does only stops when all distances are calculated - every point of input layer represented as a vertex in graph (resulting graph is much denser than necessary and path finding slower) - edges have always one direction, requiring two edges between each pair of vertices (resulting graph has twice as many edges) - graph is always built with start/finish points (does not allow temporary addition of start/finish points and their removal without complete rebuild of the graph)
- Loading branch information
Showing with 782 additions and 0 deletions.
Oops, something went wrong.