Questions tagged [pgrouting]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
23 views

Computing driving directions in pgRouting/PostGIS?

I have calculated shortest route/path by using pg_Dijkstra algorithm in PostGIS and it is working fine. Now how to calculate driving directions from starting edge to end edge. I have gone through the ...
4
votes
1answer
71 views
+50

PGrouting number of results in pgr_dijkstraCostMatrix() not right

When running the pgr_dijkstraCostMatrix() on a PostGIS database with 41000 id's I get only 144000 rows in the matrix. I would have expected much more. What am I missing? I parsed the OSM data with ...
1
vote
1answer
25 views

Creating Isochrones - pgr_drivingDistance 2.6 SQL error

Im trying to create a matrix of driving distances from an osm2pgrouting parsed dataset. Following many blogs I have the below incorrect SQL: SELECT * from ways join ( SELECT * FROM ...
1
vote
1answer
37 views

Pgrouting: Visualizing analyzegraph ring geometries

I have a sample network that I analyzed using pgr_analzyeGraph. The outputs shows that I have 3 ring geometries. How do i get which nodes is part of the ring geometries? The official document only ...
2
votes
1answer
56 views

Routing on rail network with interim points (pgrouting)

I want to use pgrouting on a rail network, stored in PostGIS. For each service number I have all the station it stops at. Until now, I set up start and end nodes for the rail edges and created the ...
4
votes
1answer
203 views

ST_LineMerge to simplify road network

I am trying to simplify my road network by finding all segments that touch 2 other lines with a common attribute, join_id and street, then doing a st_linemerge. I do NOT want to merge lines where ...
0
votes
0answers
21 views

Configure mapconfig.xml for null tag_value

I am using osm2pgrouting version 2.3.6. When using osm2pgrouting for .osm file, I created tables ways. However, when I compared it with table planet_osm_line, it lost a lot of line. I determined ...
1
vote
1answer
64 views

Performing isochrone in PostGIS by pgRouting?

In pgr_drivingDistance for isochrones the person who answered, missed to say the explanation of the answer about what function used by him to get the output for isochrone. I want to do the same but I ...
2
votes
0answers
45 views

Getting travel time while performing pgrouting i.e. what are parameters and function required?

While doing the pgrouting to find the shortest distance I got success in getting the output but when I thought to come up with the time consumed for travelling, I cannot find the proper source to get ...
3
votes
1answer
107 views

Creating map of travelling salesperson problem solution with pgrouting?

I have created the "ways" (=edges) and "ways_vertices_pgr" (=nodes) tables from OSM road data with osm2pgrouting in PostGIS. I work with this data in QGIS. Given a set of ids from the "...
1
vote
0answers
21 views

Which sensitivity analysis is most suitable on cost factors in route planner? [closed]

I am working on developing a route planner with alternative impedance/cost factor (safety of the route). I am building the application mainly in pgRouting. As a final step I would like to perform ...
0
votes
0answers
23 views

pgRouting TSP with eventual order constraints?

Is-it possible to run Travelling Sales Person (TSP) in pgRouting (I've got 2.3... installed) with constraints? A general TSP algorythm or those I've identified in pgRounting solve the TSP problem ...
4
votes
0answers
80 views

Increasing PostGIS/PostgreSQL memory to avoid Out Of Memory (OOM) error?

This is a follow-up question to my earlier question about the memory management of some PostGIS/PostgreSQL functions: How do PostGIS functions handle buffers and external storage? As suggested by ...
1
vote
0answers
12 views

Determine left/right based on headings of in & out legs

I'm analyzing roads layer to create navigation layer. Each vector Linestring segment has direction of traffic. Turn defined as where 2 directional segments meet. However, I find it challenging to ...
0
votes
2answers
27 views

osm2pgrouting can't connect to postGIS

I want to do some isochrones with pgrouting, and I am failing in setting up the network in the first place. osm2pgrouting doesn't find my postGIS installation. Also, the error message is not very ...
0
votes
1answer
47 views

Lot of roads are missing from pgRouting pgr_drivingDistance result

I started working with pgr_drivingDistance. Lot of edges (marked as yellow) are missing from result. Those seem to be cases, where routing algorithm has approached to same edge from two directions. ...
0
votes
0answers
32 views

pgr_drivingdistance seems to miss a few lines

For multiple stations I am running a pgr_drivingdistance function. Its nearly correct but it has a strange behaviour I can not place. The function seems to leave out some of the road segments around ...
2
votes
0answers
47 views

Route creation with specific length and elevation change [closed]

I'm currently working on a project for my computer science study. The goal is to make a service that allows the user to enter a distance and elevation change which will then result in a random route (...
1
vote
0answers
26 views

What is the difference between pgr_createtopology and pgr_createverticestable?

I'm using pgRouting and I'm going through the manual (Release 2.1.0) and in chapter five, it says: • pgr_createTopology - to create a topology based on the geometry. • pgr_createVerticesTable - to ...
2
votes
1answer
56 views

pgRouting assign source and target value to streets based on available nodes

I am a beginner in pgrouting. I have two tables in my postgres database. A street table, where each segment (see red line) carries an Id (ogc_fid). Additionally I have a nodes table (see brown points ...
1
vote
1answer
94 views

Multiple shortest paths with pgRouting using a list as a secondary table

I have been using a postgis database with pgRouting to solve shortest path problems. I have been using a query like: select seq, e.geom, pd.cost, pd.id1 as node from pgr_dijkstra( 'select gid as id, ...
0
votes
0answers
54 views

pgrouting control file not found error on Mac using EnterpriseDb bundle

I am new to PostGIS. I'm on a Mac running Mojave. I installed postGIS today using the EnterpriseDb bundle linked from https://postgis.net/install/ All works fine, apart from pgRouting. CREATE ...
0
votes
1answer
133 views

Walking distance with pgrouting for several locations

I'm intending to calculate the walking distance (not the linear distance, but the "real travelled distance") to several locations (e.g. social infrastructure). Thus I will have to create a routable ...
0
votes
1answer
35 views

Reverse driving distance

I am used to using pgr-route driving distance function to calculate how far I can go from a given point to a surrounding area Assuming that I have a transport graph that includes costs and reverse ...
2
votes
0answers
119 views

How to build a route that traverses every edge at least once and begins and ends at the same location?

I have a collection of lines in PostgreSQL w/PostGIS/pgRouting and have built topology. I need to produce a route that starts and ends at the same location, but traverses all of the edges. Can ...
1
vote
2answers
71 views

Ring geometries in pgRouting OSM DUMP

After performing pgRouting's "pgr_analyzeGraph" algorithm, over an Open Street Map dump uploaded to my PostGIS DB, I get this output, by I can't figure out what "ring geometries" are. Does somebod ...
1
vote
2answers
99 views

Looping through a table to allocate kids to nearest school

The general problem is to allocate town's kids to their nearest school and get the distance and the geometry. Tools in use is Postgresql 10.6, PostGIS 2.4.3 and PGRouting 2.5.2 There are three ...
0
votes
1answer
72 views

Using contextual information to plan route?

I downloaded the .osm map data, and I imported it to postgresql using the m2pgrouting. I have a CSV file on violence data, with three attributes, nature of occurrence, latitude and longitude. How do ...
2
votes
1answer
77 views

finding isolated rings in postgis

I want to find the isolated rings in an OSM dump loaded into PostGIS, using pgRouting. I need to do this in order to delete the isolated rings of the network. Does anyone know how to do it?
0
votes
1answer
28 views

Database based solution for TDSP (Fastest)

I have tried pgRouting in PostGres for finding shortest path select d.*, bs.starttime, bs.endtime, bs.trip_id from pgr_dijkstra( 'select id, source, target, traveltime as cost from my_table', ...
0
votes
2answers
59 views

Using original shapefile vs osm for routing in South Australia using pgRouting?

I'm looking at building a simple routing application using pgRouting. I'm running on Windows 10 at the moment but could migrate to Windows Server at some point. I'm trying to figure out how best to ...
2
votes
0answers
116 views

pgrouting extension slow in PostgreSQL 10?

I am trying to implement routing on my road dataset using pgrouting function pgr_createTopology. It works fine on postgresql 9.6 but gets extremely slow and get stuck as nodes increase in postgresql ...
1
vote
1answer
50 views

pgr_alphashape returns a self intersecting polygon

After using the function pgr_drivingdistance() I am attempting to make a polygon with pgr_alphashape. Following the example found in the documentation I should do the following: https://docs.pgrouting....
0
votes
1answer
39 views

pgrouting with an existing road net

I am tying to use pgrouting in order to calculate the distance that can be passed within a certain time period. Someone has provided me an updated OSM dataset with speeds. From there I am trying to ...
2
votes
0answers
28 views

Significance of Pgr_trsp() Function returning -1 in id1 column

I want to understand what's the significance of -1 value in column id1 of pgr_trsp() function output. When I run the below query I was excepting the source and target edge to be snapped according to ...
0
votes
1answer
65 views

Sequenced path using pgrouting (going through the POI of the user)

I'm using the pgr_astar function of Postgres and I want to personalize the optimal path proposed according to the preferences of the user. For example if the pg_astar propose the red path, I want to ...
1
vote
1answer
45 views

How to write dynamic SQL for a function that has dynamic SQL parameter?

I am trying to execute a string SQL query in function i.e. Create or Replace Function Route(edge_table text) Returns table(sequence integer) as $$ Begin Return Query Execute 'with r as( SELECT seq, ...
3
votes
2answers
65 views

Can Ksp Algorithm(Shortest Path Algorithm) have a constraint that the suggested paths must include a particular node or link

I am using pgr_ksp algorithm to find out the shortest path between a startnode and endnode by creating a network topology between all the nodes. Pgr_ksp algorithm very well gives me all the shortest ...
0
votes
2answers
85 views

Heuristic function of pgr_astar

Does the pgr_astar heuristic function of postgreSQL verify that the proposed path is optimal on time and length despite what mesure we choose as cost on the query? Example: When asking this query ...
1
vote
0answers
98 views

Optimal path proposed by pgr_astar is not the optimal one?

I'm using the function pgr_astar function of PostgreSQL to find the optimal path between two points in the dataset of Chicago. The query I'm using is: SELECT a.seq, a.id1 AS node, a.id2 AS edge, b....
1
vote
0answers
27 views

Refer to previous edges in PGRouting

I would like to write a cost functiont that takes into account the previous edge, rather than only the current one, to calculate for instance: Route with the smallest number of turns For that I ...
1
vote
1answer
47 views

Why PgRouting NodeNetwork function doesn't create cost and reverse_cost columns?

I'm following the instrcutions here step by step; Since my data is a custom road data that I couldn't find in Open Street Map I've followed these steps; Road data in SHP format transferred to ...
0
votes
0answers
19 views

How to change the map from template given by “suite-sdk create routing ol3view”

I'm following this tutorial http://workshops.boundlessgeo.com/tutorial-routing/ to make a dynamic routing web application. How can I add a map from my QGIS, the one shown in the picture, rather than ...
2
votes
1answer
88 views

Identifying OD-pairs where pgr_withPointsCost() did not find path?

I am currently working with the pgr_withPointsCost() function in order to get the shortest path costs for millions of origin-destination pairs of Points (OD-Pairs; Many-To-Many). I got the function to ...
0
votes
1answer
42 views

Using ogr for osm file to be used in pgrouting?

i was following this http://workshops.boundlessgeo.com/tutorial-routing/#preparing-data tutorial about building a routing application and thus im stuck in the step of preparing the data as to i dont ...
0
votes
1answer
47 views

Issue on Getting Geometry of pgRouting Query in PostGIS

I am running this query against a Table victoria enabled with pgRouting and PostGIS SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_dijkstra(' SELECT gid AS id, ...
0
votes
0answers
24 views

Blocked roads with pgRouting

What is the best practice to manage temporary blocked roads (works on the road) with pgRouting? Is there a dedicated feature adding exception? If not, i give an heavy weight to the edge?
1
vote
1answer
74 views

Running Query of pgRouting and PostGIS - dijkstra_sp_delta()?

Using PostgreSQL 10.4, compiled by Visual C++ build 1800, 64-bit PostGIS 2.4.4 pgRouting 2.6.0 and This Tutorial I am trying to run this Query $conn = pg_connect($conString); $sql = "...
1
vote
1answer
30 views

How to remove the mirror route on postgres for shortestpath using pgr_ksp algorithm?

I have created an underground route for few points and when I try to see the possible routes using pgr_ksp I end up with an extra route which is not present in the geom table. In the image below, ...
0
votes
0answers
27 views

Missing roads of San Francisco and extra parts on the map

I'm using OSM dataset of San Francisco that I have imported using osm2po to PostgreSQL and I think that there are some data missing, because when I use pgr-astar to find the shortest path, there is ...