[Qgis-user] help with shortest-path/network analysis (multiple origins to multiple destinations)

Nicolas Cadieux njacadieux.gitlab at gmail.com
Thu May 5 13:28:21 PDT 2022


Hi,

How many shortest path calculations are you looking at? You could probably do a all pairs shortest path dijkstra and filter the results.  You could batch multiple one to many (point to layers)  In QGIS using the processing plug-in.

I did create an algorithm using networkX that could be modified to work with two input layers.  This could be useful if QGIS is not fast enough or if you have too many routes to calculate.  You will find it in the links below. Keep in mind this algorithm was for rivers therefore you have no trafic rules.  This would need more work.

You will also find an article we wrote in Data that may help.  If you have trouble with the network, look in the QGIS hub for the models. Look for the 3 “fix directional networks models”.

I added a few YouTube videos I made.

https://gitlab.com/njacadieux/upstream_downstream_shortests_path_dijkstra 

https://www.mdpi.com/2306-5729/5/1/8

https://plugins.qgis.org/models/

https://youtu.be/v61PafSByvM

https://youtu.be/qQrHcKtmr3o


Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 5 mai 2022 à 10:38, Francesca Parente via Qgis-user <qgis-user at lists.osgeo.org> a écrit :
> 
> Hello everyone,
> 
> I'd need to identify optimal destinations (within a point layer of geolocated facilities) for each territory of a given set of possible origins. 
> I already calculated a distance matrix between the two point-layers, and also applied the distance-to-nearest-hub tool to generate a string layer and identify the optimal facilities.
> But I'd like to obtain a more realistic estimate, accounting for the roads network (and ideally their travel times). With quite a few issues, I finally managed to import an OSM road network from download.geofabrik.de (in order to cover my area of interest, I had to merge two different vectors fo Center and Southern Italy and then extract a focus spot in between the two and save it as a lighter layer, otherwise it also took an eternity to run every analysis). 
> 
> So now my question would be: is there a tool to perform a layer-to-layer shortest-path analysis that takes it into account? 
> All that I could find was either point-to-point or layer-to-point/point-to-layer (I looked also at built-in network analysis tool and Qneat3 plugin).
> 
> Any kind of inputs and suggestions will be more than welcome! 
> Thanks a lot for your support and have a good day,
> Francesca
> 
> -- 
> ----------------------------
> Francesca Parente
> 
> _ SESS Euro PhD in SocioEconomic and Statistical Studies
> _ Luiss SEP School of European Political Economy
> 
> 
> email: francescaparente.rse at gmail.com 
>        parentef at luiss.it 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220505/5a9a391b/attachment.htm>


More information about the Qgis-user mailing list