Questions tagged [shortest-path]

The Shortest Path is the shortest or least-cost path from a source or set of sources to a destination or set of destinations. It can often be implemented in vector or raster GIS and is often desired in network analysis such as the shortest path to a location along the road network.

Filter by
Sorted by
Tagged with
6 votes
2 answers
109 views

Finding furthest point from origin point using QGIS

I'm using QGIS 3.28 and I need to find the furthest point from an certain origin. For reference, this is a Fiber to the Home (FTTH) project. Imported data: The pink dot on the center is the point of ...
  • 69
1 vote
0 answers
23 views

QGIS - Find the shortest path on ORS Tools

I have got two layers: Point Layer 1 that has got random 'houses' in a town Point Layer 2 that has got all the post offices in the town My aim is to find the shortest path from each house from layer ...
  • 53
0 votes
1 answer
73 views

QGIS Network problem - There is no route from start point to end point

I am working with QGIS 3.20.0-Odense, but the same problem persists in QGIS 3.22.16 'Białowieża'. I am working on a distance matrix, supplemented by a vector of lines (network analisys) - The output ...
  • 107
1 vote
1 answer
78 views

How to put the end points with the same rows as the start points using shortest path tool on network roads - QGIS?

I have 2 point layers containing XY in qgis and I'm trying to get the shortest paths between each rows along a given network (row1 in first layer to row1 in second layer and so on). I used this ...
2 votes
1 answer
72 views

QGIS Shortest Path Calculation (Layer to Layer)

Using QGIS, I have a task for which I need to combine 2 point layers (with x-y coordinates in it). I managed to combine the points but they are only straight and I want them to follow the street ...
1 vote
0 answers
96 views

how could I calculate the shortest distance between points showing the distance in each different route?

I want to do a network analysis using any plugin, but the main problem is that I want to get the shortest distance between two points, but it must give me the distance in each route (in my case they ...
0 votes
1 answer
92 views

Shortest distance of point feature from one line in QGIS

I would like to ask for your help with calculating in simple way distance of points feature to one line (for example, what is distance of cities from the national border). I see there were few topics ...
  • 21
0 votes
0 answers
29 views

Calculate the distance of stations from a river outlet without crossing land [duplicate]

I have a table with several stations located in a bay. I need to calculate the distance between each station and the river outlet (a point) without crossing land. Ideally, the final product will be an ...
2 votes
1 answer
171 views

Seeking algorithm for finding shortest path around obstacles

I am seeking an algorithm, not GIS software. To find the shortest path between two points at sea with land between them, you can consider land as a polygon shaped obstacle between these. The concept ...
  • 186
1 vote
0 answers
127 views

Connecting points with closest points (lines) avoiding polygon using QGIS

How can I connect multiple points with the closest line or point of the network avoiding polygon (land or sea) in QGIS? There are over 4000 points that have to be connected this way so it would be ...
1 vote
0 answers
52 views

Making shortest path for number of each points with link layer in QGIS

I want to make shortest path for a number of each points with a link layer in QGIS. Now, shortest path tool have to click the start point and end point one by one. But I have 2,000 pairs. So I want to ...
0 votes
0 answers
18 views

Extract an Origin-Destination shortest paths shapefile

I have a question about QGIS (or Arcmap); I can't find an exact equivalent in the other questions. For a project, I need to extract the network of shortest paths between each pair in a set of 300 ...
1 vote
1 answer
11 views

sDNA - sum of traffic along shortest path

I am trying to get a measure or proxy of the estimated aadt encountered along the shortest path. One way would be to compute shortest paths between origins (around 280) and destinations (one) via skim ...
  • 111
1 vote
1 answer
92 views

How to choice a specific direction to get the shortest path

I'd like to know how to choice the left or right direction starting from a point and following a network; in the processing shortest path (from starting point to vector points layer) of QGIS. In this ...
  • 799
2 votes
1 answer
129 views

"Could not write feature into OUTPUT" error when running "Shortest path (point to layer)" in QGIS

I use QGIS 3.26 with a point and a line layer, representing cities connected by a network. Running QGIS native tool "Shortest path (point to layer)", I get the following error message: ...
  • 54.5k
7 votes
1 answer
786 views

Building the shortest route through all points in QGIS

How to build the shortest route through all selected points, starting from a given point? Which plugin to use? There is a point layer and a linear layer for all routes between points.
  • 79
0 votes
0 answers
72 views

QNEAT3 OD Matrix distance incorrect?

I am currently working on calculating the distances between all pairs of NUTS-2 regions in a road network. To accomplish this I am using the QNEAT3 plugin. It worked very efficiently and I was ...
  • 51
1 vote
0 answers
36 views

Shortest path based on priority

I'm using the geoprocessing "Shortest path (from layer to point)" of QGIS and i'd like to get the shortest path not in the usually way, but based on priority of the routes used. For example, ...
  • 799
0 votes
0 answers
112 views

Find a shortest path from a set of screen coordinates with QGIS

I have a set of screen coordinates whose x axis increase from left to right, and the y axis increase from top to bottom. Example: points = x1,y1;x2,y2;x3,y3;x4,y4........ The coordinates are just a ...
  • 1,007
3 votes
1 answer
59 views

Calculating region pair distances along network in QGIS 3.22.4

I'm currently attempting to calculate the distances between several thousand region pairs (centroids) along the Roman road network in QGIS. I want to achieve something similar to the "Shortest ...
  • 51
4 votes
1 answer
295 views

Automating the selection of starting points in calculation of Shortest path (point to layer) in QGIS

For a letter drop experiment in Germany, I am using QGIS Network Analysis tools to calculate the shortest distances from letter drop points to surrounding postboxes. Using the "Shortest path (...
-1 votes
1 answer
35 views

Vector line length vs. geographical distance (as a bird flies) [closed]

Is there a way to compare the length of a line (ESRI Shapefile in my case) to the actual distance it covers with freely available tools? I am developing an optional path algorithm. The image below ...
3 votes
1 answer
182 views

Creating multiple routes with several stops using QGIS

I am trying to find the shortest paths given a number of points with a specific order for each path. Specifically, my point data have the following format: I used the approved solution given in ...
  • 113
2 votes
0 answers
59 views

Finding shortest line ("arc") traversing a road

Is there any existing method (Qgis plugin, PostGIS etc.) to find the best (shortest) line (arc) to follow in order to traverse a road (represented as polygonal area)? If not, what algorithmic approach ...
  • 1,709
1 vote
1 answer
211 views

Putting coordinates of end point in shortest path algorithm

How do I put the coordinates (x,y) of the end point of the shortest path algorithm (from vector to point) which is part of a QGIS model? I'd like to get the calculated coordinates of a point (with the ...
  • 799
7 votes
3 answers
621 views

Calculating shortest route by road from one origin point to multiple destination points at once using PostGIS (pgrouting)

Referring to the below snapshot what is the best possible way to find the road distance from the red star node to all of the yellow nodes using PostGIS. Note: I don't have the road distance data ...
  • 339
9 votes
2 answers
2k views

Shortest path touching all points

I am looking for a solution to derive the shortest route that touches all the points using Python. Please note that This is not a Travelling salesman problem (TSP), in which the route should end ...
  • 367
5 votes
2 answers
485 views

Shortest paths between points over multiple linestrings

I'd like to calculate the distance between one and multiple other points along a network of LineStrings. I'm aware of this question which calculates the distance on a substring of a LineString, but ...
  • 1,235
2 votes
1 answer
103 views

Shortest path points layer to points layer

i'd like to know how can i get in QGIS the shortest path from a points layer to points layer, according to field values. In QGIS, I've seen only the function "from vector to single point" ...
  • 799
1 vote
0 answers
25 views

Has any research been done into navigability for offroad vehicles for different types of terrain and elevation changes? [closed]

"Navigability" is a pretty broad category, so to be specific, what I mean is, given some GIS data, how can we calculate the cost of moving from point A to point B, in some context? For ...
3 votes
1 answer
195 views

Shortest path (point to point) in iteration, safe for the case there is no route

I am using Network Analysis > Shortest path (point to point) to compute the distance between two points, following a street network. Here is the code: n=0 for f1 in layer1: #Coordinates from ...
  • 65
0 votes
0 answers
504 views

Shortest-path algorithms used in Networkx: what about points not near nodes?

I am new to Networkx, but am I right that Dijkstra's is the algorithm Networkx uses by default? From what I understand, Dijkstra's algorithm traces a shortest path between two nodes on a graph. What, ...
0 votes
1 answer
796 views

Seeing which node has given node ID in osmnx [closed]

I have been reading the documentation on OSMnx and I am trying to use the command osmnx.shortest_path(G, orig, dest, weight = "length") on a graph of a city. I know which nodes I want to ...
1 vote
2 answers
239 views

Alternatives to Network Analyst in ArcGIS for utility network tracing

I have feature classes of lines (roads) and two types of point feature classes (let’s call them “sources” and “sinks”; there are many sinks for every source). For every source, I need to trace the ...
1 vote
1 answer
71 views

Keep line attributes in QGIS Network Analysis - Shortest Path

I'm running a simply Shortest Path task from the Network Analysis toolbox in QGIS, but it seems that the output doesn't transfer the line attributes, only the start layer attributes. I need the road ...
  • 423
0 votes
2 answers
926 views

Calculating road travel distance between point and polygon layers [closed]

I am trying to calculate the top three shortest distances from a point file (buildings) to a polygon file (designated natural areas) via road networks. I basically need the "Join attribute by ...
0 votes
0 answers
37 views

Finding the point closest to a point in another feature class and the paths between them

There are two point feature classes (let's call them Sinks and Sources). Working with ArcGIS Desktop, I need to find, for each Sink, its nearest Source. Normally I'd do a spatial join, but this time I ...
3 votes
0 answers
160 views

Shortest line network route between clusters of points and the cluster centroid

I have a point layer containing clusters of points (premises) that I have grouped using a clustering algorithm (the clusters each having their own unique ID which I have used to create convex hull ...
1 vote
1 answer
272 views

How to calculate the shortest path of adjacent points, from an origin to destination points? (ArcGIS Pro/ArcMap)

For a project I am trying calculate the shortest path (marked by points, not lines) connecting a point of origin to a destination point (different feature layer) and automate this for several segments/...
  • 489
2 votes
1 answer
135 views

"Unable to execute algorithm Could not load source layer for INPUT: invalid value" when calculating shortest path using two network layers in PyQGIS

Using PyQGIS I can calculate the shortest path from point to point. But I need to calculate the shortest path based on two network layers: A and B. So that the result should be the shortest path from ...
  • 329
1 vote
1 answer
24 views

Editing network for shortest path

I am editing road network to create scenarios but Shortest Path is not recognizing the edits. I am assuming the edited street network is not connecting with other streets at intersections. I have ...
3 votes
3 answers
4k views

Connecting points to lines in order using QGIS

I have a set of points and I want to create lines from them. Points belonging to one line have unique "UniqueID" to be grouped by. I try to use QGIS's "Points to path algorithm". ...
  • 213
3 votes
1 answer
53 views

Compute the number of shortest paths that use a link

I am currently computing shortest path algorithms between two sets of points (origin set and destination set) and a road network, using the plugin QNEAT3. It works and gives me the distances between ...
  • 31
2 votes
0 answers
236 views

QGIS Shortest path (point to layer) start point expression in modeller

When in QGIS I run processing tool Shortest path (point to layer) ... I am satisfied with the result (below picture red line). But when I try to run the same tool in QGIS modeller, the result is ...
  • 383
1 vote
1 answer
90 views

Incorrect Shortest Paths

I compute shortest paths between ports. However, some of the resulting paths are simply incorrect. Consider the following example where coast is multi-polygon object of the planet's landmass (e.g. ...
  • 268
2 votes
0 answers
446 views

Using shortest path pgr_dijkstra

Versions PostGIS Bundle 3 for PostgreSQL x64 12 pgAdmin 4.24 pgrouting 3.1.0 I have also enabled the postgis and pgrouting extensions on a public schema. I am only just starting with pgrouting so I am ...
1 vote
0 answers
74 views

How to connect / 'join' lines selectively but automatically in QGIS

I had a similar problem a while back with How to join (draw new) lines that are close but not touching - large dataset This is the same dataset, however I found a problem with what I did before. The ...
  • 49
2 votes
1 answer
200 views

Shortest path (point to point) when filling out coordinates in boxes

I am using the processing toolbox interface to launch the "Shortest path (point to point)" command to connect two points using a line network layer (see attached photo). If I fill out the ...
  • 41
0 votes
0 answers
179 views

Shortest road route calculation on OpenLayers GeoDjango

I have created a web based GIS application using Django, Mapnik, Mapproxy, OpenLayers 6. Now I need to develop a shortest path(road distance) between two points selected by the user. What is the best ...
  • 61
1 vote
0 answers
27 views

Calculation of intermediate points along shortest path not working correctly

I am trying to implement the calculation of points along the shortest path using the algorithm shown here: LatLng getGreatCirclePoint(double lat1, double lon1, double lat2, double lon2) { double d = ...
  • 111