Questions tagged [pgrouting]

pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.

Filter by
Sorted by
Tagged with
5
votes
3answers
205 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 ...
0
votes
0answers
23 views

How to define turn restrictions in pgrouting

I try to make navigation system for calculating the shortest path in Postgres via pgRouting. In my dataset I have roads with all needed attributes (road ID, name, length, oneway…). I have one more ...
1
vote
0answers
34 views

PostgreSQL API and QField

Does anyone know how to create a QField API, because I think it's going to work in my case. What I want to achieve is load a heavy PostgreSQL DB on QField (The project contains a lot of tables about ...
0
votes
0answers
29 views

Adding distance threshold to pgrouting script

I have created a loop which produces the shortest distance route between all origins and destinations within a study area. This is essentially showing routes undertaken by motorised transportation as ...
0
votes
0answers
45 views

pgRouting: pgr_TSP starting node

I'm using pgr_TSP to calculate the shortest path between nodes in a road network. In some cases, I give the start vertex id, but in some other cases, I just need the shortest path (best solution) ...
1
vote
1answer
30 views

pgRouting ways table attributes description

I've imported an extract of OSM data for my region of interest to Postgresql using osm2pgrouting 2.3.6 in Linux, using mapconfig_for_cars.xml configuration file, and I've found that it created tables ...
3
votes
1answer
27 views

pgrouting - pgr_nodeNetwork: Can NOT determine the srid of the geometry "osm_id" IN table

I have been following the guide in order to import PBF data into a PostGIS database: pgrouting - documentation. I have downloaded the Belgium PBF from Geofabrik and installed all extensions needed ...
2
votes
1answer
40 views

pgRouting: How to get other edge attributes

I have imported some OSM data in a PostGIS database (using osm2pgrouting) to use with pgRouting. I use Python to send the SQL queries. It works fine, however I noticed that the result includes many ...
1
vote
0answers
60 views

PGRouting: build path without shortcuts

I create a pathfinding algorithm using pgrouting library. This is the output I get with pgr_dijkstra: However, I do not need the shortcuts I'm having here. What are the possible approaches to make ...
0
votes
1answer
26 views

How to do pgr_analyzeoneway pgrouting

I try to do pgr_analyzeoneway to my network road data from OSM. But there's some parameter that I don't know what I should input event though already read the example: s_in_rules: text[] source node ...
2
votes
2answers
38 views

Distance error with pgr_withPointsCost

Using pgrouting 3.1, I'm getting a error when doing a many to many calculation. I've reduced it to a one to many to try and find out what I'm doing wrong. So with a starting point (green) [33] and end ...
3
votes
1answer
48 views

How to count number of attributes and then link back to road network - pgrouting

I have created generated a many-to-many shortest distance route using pgRouting. The output table displays the typical pgRouting outputs (seq, path_seq, edge, node, cost etc.) as well as the road ...
2
votes
1answer
105 views

Location optimisation

I am trying to work out optimal locations of our devices for a given network with a set of placement rules. The main rule is that each device should be within range (i.e. 1000m) of one to two other ...
2
votes
1answer
65 views

PGRouting create topology using a subset of a table

I need to create a series of street networks for a neighbourhood in a city. I have used PGRouting before using a whole table to create a topology but I have not been able to do so with only a subset, ...
0
votes
1answer
155 views

Problem with Nearest vertex and Shortest Path function in Leaflet

I am a new Leaflet user and I have challenge to get shortest path by pgRouting, GeoServer and Leaflet as a front end application. I followed this tutorial pgRouting + GeoServer + Leaflet JS as a ...
2
votes
1answer
120 views

Why is pgr_dijkstra not giving shortest path

I am using a road network and the following postgres/postgis operations to perform routing using pg_routing and the pgr_dijkstra method. I am successfully generating routes but they are not the ...
0
votes
1answer
41 views

pgr_dijkstra select shortest path for pairs

I have a a set of start and end nodes in a table best_routes start_vid | end_vid ------------------- 1 | 7 2 | 8 3 | 9 I want to use pgr_dijkstra to create shortest ...
0
votes
0answers
10 views

visualising edge_graph from list pgr_dijkstra graph [duplicate]

I am creating a query that finds the shortest path from dangerous crossing nodes to hospitals (many-to-many). I have the proper output from pgr_dijkstra, with output as follows seq | path_seq | ...
0
votes
0answers
28 views

visualising edge_graph from list pgr_dijkstra graph

I am creating a query that finds the shortest path from dangerous crossing nodes to hospitals (many-to-many). I have the proper output from pgr_dijkstra, with output as follows seq | path_seq | ...
0
votes
1answer
68 views

Finding the path between the point

I'm very new to the PostGIS and QGIS. I'm a student and I am doing thesis work on map matching. I have segment shapefile of two network one OSM network and other one TMC network. And I have point ...
2
votes
0answers
44 views

Why pgr_dijkstra function is faster with directed graph?

I'm doing thousands of tests to get the average route time calculated with the pgr_dijkstra function, taking random nodes. In all tests the average time to generate the routes of the directed graphs (...
4
votes
1answer
116 views

Calculate all points in network that are x distance from a starting point in PostGIS with pgrouting

I am trying to write an SQL that calculates all points at a given distance from a point within a network (most likely the wrong term) where the network is stored in a PostgreSQL/PostGIS database as ...
1
vote
1answer
45 views

Is the geometry type of PostGIS represented as WKT or just the Point type?

Despite reading a lot of materials on the subject, including the PostGIS manual I still haven't been able to understand, I'm a beginner in this world of geographic objects. I have two tables in my ...
0
votes
0answers
21 views

Using pgRouting final disconnected nodes from given node

I am new to using the pgRouting library and haven been given a standard edge table id, source, target, cost, reverse_cost I am comfortable with shortest path algorithms, etc, but this has me ...
4
votes
1answer
99 views

pgr_dijkstra is considering one-way streets as bidirectional

I imported data from a map extracted from OpenStreetMap. With osm2pgrouting I imported it into PostgreSQL, to be worked with pgRouting and PostGIS. Command used: osm2pgrouting -f DIRECTORY/map.osm -d ...
1
vote
1answer
35 views

Closest facilities using Pgr_Withpoint

I am trying to calculate the shortest path's distance from certain locations to their closest schools, I used the Pgr_WithPointsCost Function to get the result from one location to its 10 closest ...
1
vote
1answer
33 views

pgr_dijkstra with dynamic IDs

I am trying to use dynamic IDs so I can create a bounding box over the edges. I do have a starting road, which I set up before the query. The closest road_id from a city's coordinates. (i.e. 923342 in ...
1
vote
1answer
34 views

Distance Thresholds - pgRouting

I have been working with a set of data which mimics a shortest distance 'many to many' network analysis between COA population weighted centroids and education points in Bristol. My population ...
0
votes
1answer
49 views

Import OSM file into pgrouting, keeping certain key/values

i want to import a big (10G) OSM network into PostGIS for pgRouting. As i have to do some postprocessing with Postgres i need to load some key/values from the OSM dataset into the database as well, e....
0
votes
0answers
22 views

Missing nodes in pgr_drivingdistance

I'm trying to build a distance matrix from all municipalities to all airports in the Canary Islands using pgrouting. I've had problems with disconnected islands and so on using OpenStreetMap data so I'...
1
vote
0answers
68 views

pgRouting - Assigning source and target from different point layers (AOIs) for network analysis

I'm new to pgrouting and normally use ArcMap to conduct any sort of network analysis. I have created a simple shortest path network along a downloaded OS Mastermap road network using pgRouting. ...
0
votes
0answers
16 views

How to return all minimum paths for one to one with pgr_dijkstra?

Is it posssible? I need to calculate all shortests paths for the same one to one, but in my topology exists severals solutions, not only one (a simply example is when all costs are 0). How can I get ...
1
vote
1answer
35 views

Order and orientation of pgRouting result

I have a routing application based on pgRouting and OSM data. When I generate a route from coordinates A to B, it works well, but when I export the geojson to GPX format, I notice, that some ...
3
votes
1answer
155 views

osm2pgrouting ERROR: relation "__ways****" does not exist

I'm using osm2pgrouting. It works for small datasets very well but when I run it on a large dataset, it start good but after some processing like 40% it starts giving following error [*****************...
0
votes
0answers
52 views

Get PostGIS geometry viewer route drawing

I am using pgrouting pgr_dijkstra function to calculate the shortest path between two points. Sorting the result by "seq" gives me the correct sequence of the path to my destination. In the ...
0
votes
1answer
40 views

Speed up pgr_dijkstraCost

I have a pgRouting network graph of ~ 1 mio edges and ~ 0.4 mio vertices. I want to find out something like "nearest facility" for bigger subsets. E.g. i have a bigger number of source ...
0
votes
1answer
81 views

PostGIS : Find direction between custom GPS tracks (linestrings) intersected with pgr_dijkstra route

I have many custom GPS tracks(linestrings) and a route generated by pgr_dijkstra by giving source & destination as input. Using ST_Intersects, I able to filter required GPS tracks belongs to the ...
2
votes
1answer
82 views

Converting the result of pgr_dijkstra routing to an encoded polyline

I have this query for routing which is working, and would like it to give me an encoded polyline as a result instead of segmented geometries because I want to display it easily on a mobile Google ...
1
vote
0answers
65 views

Taking line substring from pgr_withpoints output

I want to compute the shortest route through a network between two arbitrary points along edges in the network and then get the line substring for that route. I have achieved this with the code below ...
0
votes
1answer
53 views

How to add links to a GIS road network, for example, for ferry routes?

I am using PostgreSQL with PostGIS (for spatial queries like ST_LineLocatePoint()) and pgRouting (for shortest path). The road network I have does not include links for ferries, which is the ...
0
votes
1answer
47 views

Pgr_WithPoints : POIs in different tables

Is it possible to calculate the minimal distance between 2 points outside of routing network using pgr_withPoints, knowing that these points are from different tables? I tried to group them in one ...
2
votes
1answer
119 views

PgRouting : pgr_withpoints issue

Following my Other Question about non-network integrating routing, I have tried the with-points functions using the code proposed in the answer. The problem is I don't get the shortest path using ...
1
vote
2answers
109 views

House numbers as multiple stops route with pgRouting

How do I create a routing with multiple stops? Currently I have uploaded on PostGIS the nodes and edges of the road graph but I want the stops to match the housenumbers. The ideal work would be to ...
0
votes
2answers
67 views

Is there a routing solution for PostGIS that supports Theta Star?

I have a data set with 10m of accuracy. I have drones with a GPS that provides far finer resolution. I would like to provide pathing for my drone that exceeds the 10m of accuracy. I believe theta star ...
2
votes
0answers
196 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 ...
0
votes
1answer
34 views

pgr_createTopology does not create vertices at every end of the lines of a street network

I am using pgRouting with a street network. I added lines to the network that represent straight lines from destination points I am interested to the nearest street using ST_ShortestLine(). Now I ran ...
1
vote
0answers
47 views

TSP function with pgrouting

I'm trying the TSP function with pgrouting with just a few of the many nodes obtained with osm2pgrouting (I also have the edges, of course). I'm not an expert but once I run the query, it works and ...
0
votes
0answers
36 views

How to find shortest route between ANY source for ALL targets?

I have a list of starting points and a list of target points for pgRouting. I want to calculate the shortest path for every pair of [source,target]. I am using a subselect to pass an array of node id'...
1
vote
3answers
102 views

How to calculate shortest path dynamically considering other shortest paths calculated in same run?

My topic is to minimize the cost of construction line digging. Starting from a source point I have several households that need to be connected to the that line. My plan was to calculate the shortest ...
1
vote
1answer
135 views

How to identify pgrouting nodes I am interested after splitting road network in for many to many routing?

So I have a list of source points and a list of destination points. I also have a street network and I have created connection lines using ST_ShortestLine() between source/destination points and the ...

1
2 3 4 5
18