Bug report #17325
QGIS 2.99 with Network Analysis Error
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Windows 10 Enterprize||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25223|
I am testing the Processing Toolbox>Network Analysis>Shortest Path tools to find the shortest paths from a point feature, along a road network to a final point.
During my testing I receive an error, which occurs with the other tools.
The data I am using is shapefiles.
Attached are errors I receive using each tool.
[processing] Shortest path handling for multipoint layers
Fixes shortest path algorithms fail for multipoint source layers
or layers with null geometries
Fix broken network analysis network tolerance option
The tolerance option was not correctly calculated, resulting in
semi-random behavior for networks which relied on a non-zero
Also possible speed boost for complex networks by using
proper spatial index instead of custom sorting/filtering code.
Fix QgsGraphAnalyzer::dijkstra traverses through edges backwards
This means that it flips the direction of the graph edge, breaking
#5 Updated by Nyall Dawson about 5 years ago
Should be fixed in the next nightly release. Some things to note:
1. Your road network has small gaps, so you'll need to set a tolerance (under advanced) of something like 0.1
2. You'll get much better results if you pre-process your road network a bit. I'd suggest:
- run the 'snap geometries to layer' algorithm over it, and snap it back to itself (will move nearby vertices so that they exactly coincide)
- run the 'split with lines' algorithm over it, using the snapped layer as both the source and split layer (will create additional nodes where lines overlap, which the network analysis tools require)
- run 'multiparts to singleparts' on the result.
#6 Updated by Joshua Geoghegan about 5 years ago
- File shortest_routes.jpg added
We have been using this and following your instructions.
Sometimes the path takes an indirect route even when the linework is quite simple, which you can see from the attached image.
The blue dots are the start point, well the nearest road. You can also see a couple of points aren't being included.
We have played with the topology tolerance but it doesn't seem to help.
Would you have any advice on this?