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
1 vote
0 answers
21 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, ...
user avatar
  • 649
0 votes
0 answers
65 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 ...
user avatar
  • 1,007
2 votes
0 answers
36 views

QGIS 3.22.4: Calculating region pair distances along network

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 ...
user avatar
  • 21
0 votes
0 answers
70 views

How to find shortest path point to lpoint using Python?

Suppose I have two coordinates and one shapefile that contains road network (or pipes, or cables, anything). How do I produce the shortest path (line) using Python? The output should be a line that ...
user avatar
  • 622
4 votes
1 answer
74 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 (...
user avatar
-1 votes
1 answer
34 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 ...
user avatar
3 votes
1 answer
52 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 ...
user avatar
  • 103
2 votes
0 answers
44 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 ...
user avatar
  • 1,679
1 vote
1 answer
90 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 ...
user avatar
  • 649
7 votes
3 answers
352 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 ...
user avatar
  • 319
6 votes
2 answers
342 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 ...
user avatar
  • 315
5 votes
2 answers
180 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 ...
user avatar
  • 1,195
2 votes
1 answer
51 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" ...
user avatar
  • 649
1 vote
0 answers
20 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 ...
user avatar
3 votes
1 answer
53 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 ...
user avatar
  • 65
0 votes
0 answers
148 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, ...
user avatar
0 votes
1 answer
224 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 ...
user avatar
0 votes
0 answers
21 views

Output from Mean coordinate to input of shortest path in model

I'm building a model in QGIS 3 and I want to be able to "feed" the output of Mean Coordinate to the input "Start point" of Shortest Path. The issue is that in Shortest Path I ...
user avatar
1 vote
2 answers
117 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 ...
user avatar
1 vote
1 answer
38 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 ...
user avatar
  • 423
0 votes
2 answers
248 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 ...
user avatar
0 votes
0 answers
27 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 ...
user avatar
3 votes
0 answers
97 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 ...
user avatar
1 vote
1 answer
174 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/...
user avatar
  • 477
1 vote
1 answer
83 views

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 ...
user avatar
  • 149
1 vote
1 answer
23 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 ...
user avatar
3 votes
3 answers
2k 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". ...
user avatar
  • 213
3 votes
1 answer
39 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 ...
user avatar
  • 31
2 votes
0 answers
129 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 ...
user avatar
  • 121
1 vote
1 answer
62 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. ...
user avatar
  • 248
2 votes
0 answers
253 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 ...
user avatar
1 vote
0 answers
50 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 ...
user avatar
  • 29
1 vote
1 answer
116 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 ...
user avatar
  • 31
0 votes
0 answers
121 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 ...
user avatar
  • 51
1 vote
0 answers
19 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 = ...
user avatar
  • 111
0 votes
0 answers
123 views

Using pg_routing to connect point to closest point of set of points

Imagine we have the location of a person (point) and 100 restaurants (each is a point). My objective is to calculate the path from the person to the nearest restaurant (just one), but I want to avoid ...
user avatar
2 votes
0 answers
52 views

Shortest path from one to many points to return path id's using QGIS

I'm trying to find the shortest path between many points (pink) and one point (light green) using a network of lines (dark green). For each path found I need the list of line id's that make that path. ...
user avatar
1 vote
0 answers
68 views

Qgis Shortest Path Facility problem

My aim is to calculate the shortest distance between two point layers One point layer contains Origin points, the other point layer contains Destination points. Both layers contain more than 100 data ...
user avatar
  • 11
1 vote
0 answers
42 views

Network Analysis Shortest path with original line segments as output

I've managed to batch run the shortest path algorithm and the shortest route (point to layer) in the output is perfect, except that I really need the individual attribute tables of the line segments ...
user avatar
  • 11
2 votes
0 answers
64 views

Shortest path for a series of points

I have a points layer with bus stop locations and a line layer which represents the road network. I want to find the shortest path for each bus route based on the sequence of bus stops and save the ...
user avatar
0 votes
1 answer
37 views

PGRouting Error Missing table?

I am trying to use pgrouting to find the shortest path in GeoServer. So I created new layer in sql view but its giving me error. I created 3 table in database: at_2po_4pgr = main table ...
user avatar
0 votes
0 answers
19 views

Shortest path not recognising network as connected

I'm trying to use a grid network that I have created to find the shortest path between two points accounting for directional wind-speed. The problem I'm running into is that the shortest path feature ...
user avatar
1 vote
1 answer
44 views

Problem with QGIS Network Analyst (Basic)

I'm going through the QGIS training, Lesson: Network Analysis, and I've encountered a problem with Network Analyst. When I open the Shortest Path (Pt to Pt) tool, I can set the Vector layer ...
user avatar
  • 39
1 vote
1 answer
347 views

Transition Function Inputs

I would like to define my own gdistance::transition function. However, there are two issues that I aren't clear to me yet. First, I do not yet understand what the input vector to this transition() ...
user avatar
4 votes
0 answers
104 views

Shortest path (point to point) in iteration

I am using Network Analysis-> Shortest path (point to point) to compute the distance between two points, following a network from OSM. It works like magic for single requests, but I do not seem to be ...
user avatar
  • 103
2 votes
0 answers
42 views

How to make output generated from shortest path in QGIS more reasonable

My goal is to generate bus route stop by stop given the bus route and stops with sequence number of single direction. I tried to achieve this by using shortest path in QGIS stop by stop. However, ...
user avatar
  • 345
3 votes
1 answer
354 views

Shortest distance for multiple starting points

I am looking to calculate the shortest distance along a road network for multiple starting points. The reason I am not doing this manually is that I have more than 5000 starting points. Does anyone ...
user avatar
  • 59
0 votes
1 answer
107 views

Iterate the shortest path point to layer

I have two layers. First layer defines the starting points and the second defines the end points. I just want to iterate the same algorithm "point to layer" by considering all the points of the first ...
user avatar
0 votes
0 answers
61 views

Why might Location Allocation give long paths when much shorter paths exist?

I'm using location-allocation in the network analyst toolbox of ArcMap to add features to my map. My objective function is to minimize impedance (meters). The image below shows the result. As you ...
user avatar
  • 101
1 vote
0 answers
31 views

Shortest Path between large area -- RAM issue

I built a shortest path algorithm that finds and stores the distance of the optimal path between neighboring grid cells using a friction surface as an input. It works beautifully but I am facing RAM ...
user avatar