Saturday 6 June 2015

qgis - Distance Matrix with 2 point shapefiles and one street network



I have two point shapefiles (start/destination) and one sort of street network shapefile. I would like a to create a distance matrix from the start-shapefile to the destination points, using the street network file. It does not necessarily have to be "shortest path", because mostly there is only one way anyway.


I am using QGIS 3.21 at the moment, but I have 2.18 also, so I don't really care on which one.


Is there a proper solution?



Answer



You can use the plugin QNEAT3 which is available for QGIS3. It offers multiple processing algorithms that produce origin-destination matrices (OD-Matrix) as line layer, table or csv file. It also supports m:n relations which fits to your two layers in your question. All algorithms rely on the dijkstra() method in the qgis.analysis module, therefore all costs are calculated on the basis of shortest paths.


You can get more information about the plugin at the qgis plugin repository and at the plugins documentation.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...