Questions tagged [pgrouting]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
15 views

Routing only with specified points

I'm very new to GIS and to pgRouting. We're implementing a Routing system in our app and we need to route between points that we'll define ourself. So far, we have a working pgRouting on Postgis (on ...
2
votes
0answers
37 views

pgRouting: pgr_KSP() does not return shortest path when k > 1

I am trying to get an arbitrary number of paths between two points in a network. I am using pgr_KSP — Returns the “K” shortest paths. My aim is to get the K cheapest routes between two points. ...
0
votes
1answer
24 views

Analysis electric network with pgRouting

Electric network is a kind of utility network in GIS. In this network we have a point layer that consist power stations and end users. Power stations called source and end users called sink. And also ...
0
votes
0answers
17 views

Losing connection to the server when using PG Routing function pgr_alphaShapes

I am running PG Routing v. 3.0 on Postgresql 12.2 and the pgr_alphaShapes function is giving me a lot of trouble. Following the documentation here, I passed a geometry and a spoon radius. SELECT * ...
1
vote
1answer
21 views

Replacement for pgr_pointToEdgeNode for pgr 3.0

I am working through the book 'pgRouting: A Practical Guide' and have come across a function that has been deprecated. The function is pgr_pointToEdgeNode. Is there a similar function I can use to ...
1
vote
1answer
37 views

Error load new layer from query result

I tried many times to create new layer from query result, but i got this error message, when loading it. " PostgreSQL layer has no primary key." SELECT * FROM pgr_drivingDistance('select gid::...
1
vote
0answers
25 views

Connect pg routing to HTML webpage for routing application

I am trying to create a web based routing application for my final year project. I am currently trying to connect my web page with pg_routing. I have all my features loaded in GeoServer and PostgreSQL....
0
votes
0answers
11 views

How to install pgRouting and use it in pgadmin4 in OSX

Is there a straightforward way to install pgRouting in my existing PostgreSQL(version 11) installation and use it through my pgadmin4 by creating an extension? I am using OSX.
1
vote
1answer
60 views

How to limit the search for facilities to only 1 unit with PG Routing? … Closest Facility in PostGIS?

I'm working in PGROUTING - POSTGIS I have my road network and two sets of points -firestation and the entire cityblocks from town (in diferent tables, 1 for origin, and 1 for destination). The plan ...
0
votes
1answer
19 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 ...
1
vote
0answers
61 views

Finding nearest POIs by travel time(not distance) given current location and travel method

A user can choose between walking, bicycling, public transit, or driving for X minutes. Their current location is a latitude and longitude pair given by the HTML5 Geolocation API(wgs84). The (roughly ...
0
votes
0answers
19 views

Issues with pg_routing installation on Mac

I've never had issues with installation on PC but now I'm trying to install on Mac and at first, when I went to create the extension after I downloaded I got a message that said something like cannot ...
0
votes
1answer
51 views

Distance in Meters/Kilometers from pgr_drivingdistance

I am having trouble calculating distance (driving distance) along a route with the pgr_drivingdistance function. I have a straightforward workflow, I download OSM data, and put that into postgresql ...
2
votes
1answer
44 views

PGrouting costs

Most algorithms have two functions: A normal one: like dijkstra() A Cost-version: like DijkstraCost() I want the result of the cost version: A fast computation of the total seconds. In mine edges ...
1
vote
1answer
75 views

Bounding box in Dijkstra algorithm (many to many)

I apologize for the delicate duplication of my TOPIC but I am still standing. I have the table, which has information about pairs between source places and points (without geometry). I have used this ...
2
votes
2answers
62 views

PgRouting coverage area with node restrictions

I have a water network in which there exist valves at nodes between two edges (pipes). When the valve is open water can flow, if not, it can't. How can I calculate the catchment area from a start ...
1
vote
1answer
53 views

pgr_dijkstra ERROR: invalid memory alloc request size 1080000000

I am using pgr_version 2.6.3 I tried googling, most of the posts suggest the data is corrupted. So I tried pg_dump and select row by row to try finding the corrupted row, but did not encounter any ...
2
votes
1answer
84 views

pgr_dijkstra return empty set after using osm2pgRouting

I recently started to work with pgRouting with this osm file So I used osm2pgRouting to parse the file and load it into the DB. osm2pgRouting (using the mapconfig_for_pedestrian.xml) work's fine, ...
1
vote
0answers
52 views

Query example in pgrouting by PostGIS

I found a query in the web which create catchments by pgrouting. I tried the query several times and modified a bit. But it dosen´t work. It alwys shows me the same error. DO $$ DECLARE c ...
0
votes
0answers
17 views

pgr_dijkstra not returning anything when using the same vertex

I'm using pgRouting 2.3 and in the description of the pgr_dijkstra function states that: When the starting vertex and ending vertex are the same, there is no path. The agg_cost the non included ...
1
vote
2answers
146 views

function pgr_pointsaspolygon(unknown) does not exist

Im trying to run the query below in postgresql/postgis: SELECT ST_AsText(pgr_pointsAsPolygon('SELECT id::int4, ST_X(geo)::float8 AS x, ST_Y(geo)::float8 as y FROM junction WHERE id IN ( 1050062040,.. ...
1
vote
1answer
112 views

Query shortest path from coordinates with pgrouting

How do I calculate the path, pass coordinates and, if possible, in the return function, have the route coordinate list? (I'm trying to plot the route with the ipyleaflet library in a jupyter notebook, ...
1
vote
0answers
23 views

pg_ksp is extremely memory intensive for k>1

I am using pg_ksp (from the pg_routing extension for postgis) on a subset of the OpenStreetMap database with 400.000 nodes, if I set k=1 to find the best path the query takes about a second and around ...
1
vote
0answers
36 views

pg_routing source and target column issue

I have created pgr_createTopology() function on my road data table which accurately assign source and target to destination road table, but I have an issue when I split a road segment in qgis it ...
2
votes
1answer
36 views

Creating polygon from points with other attributes in pgRouting

I have table, which looks like this: This is the result of pgr_drivingdistance. I would like to create a polygons for each mz. I tried to use group by. drop table if exists service_area_polygon; ...
2
votes
1answer
99 views

Calculate catchment area with pgrouting

I have the road networks from osm and I created topology. I know that dijkstra algorithm works, because I calculated the shortest path from two point layers. Now I would like to calculate catchment ...
0
votes
0answers
26 views

pgrouting at unsplitted roads

I have a railroad network and want to use shortest path algorithm on that. Unfortunately I have a problem at this intersection, where I want to have the path coming over edge 14692 to 14620 and ...
2
votes
0answers
71 views

How to make Dijkstra faster?

I would like to compute shortest path between 2,5 millions pairs. I created table with id, origin, the nearest node of origin, destination, the nearest node of destination. I also created index on ...
2
votes
1answer
115 views

pgr_createTopology uses too much memory and “connection to the server has been lost”

I have the large roads network (urban walking paths). I'm trying create topology in my database but when query reaches 175 thousands of edges, begins to increase memory usage. In the same time CPU ...
1
vote
0answers
65 views

pgr_dijkstra invalid memory request size

I am trying to create a network of paths using pgr_dijkstra. I keep getting an invalid memory error: ERROR: invalid memory alloc request size 1080000000 CONTEXT: SQL function "pgr_dijkstra" ...
1
vote
1answer
170 views

Combining the output of ST_Collect/ST_Union to create linestring from multilinestring?

I am using pgr_dijkstra() to compute the shortest path and then using ST_Collect (or ST_Union) to get the shortest path geometry. However, the collection returned from the ST_Collect is a multi-...
2
votes
1answer
125 views

pgr_dijkstra gives wacky routes sometimes with undirected graph

I am using the function below to find the shortest path between several origin-destination pairs, and it seems to work correctly most of the time. CREATE OR REPLACE FUNCTION public.sp_od( orig ...
0
votes
0answers
39 views

What closeness measures are appropriate to this undirected graph?

I need a way to measure the closeness centrality of every single NODE(i) in respect to all NODES(j), 1 NODE(i) to all NODES(j) and, another measure that describe somehow the geometric properties of ...
2
votes
1answer
100 views

Speed up the shortest distance calculation using pgRouting + PostGIS

I have to calculate the shortest path and corresponding distances for 300k+ origin-destination (OD) pairs. Using the query below it takes me around 0.3 sec to calculate one distance and therefore more ...
2
votes
1answer
198 views

Why pgr_dijkstra() only finds the routes that are pretty straight?

I am trying to use pgRouting in order to find the shortest route between two points. I realized that pgr_dijkstra() function is not able to find the route when the two points are far from each other ...
1
vote
1answer
29 views

Fails ST_intersects(geom, select statement) for drive time

I am trying to select houses in a drive time isochrone. I have the code working fine to make the isochrone. I can't place the results in a seperate table I need the isochrone in a where clause Is ...
1
vote
0answers
34 views

pgRouting bus travel mode [closed]

I am preparing a routing function with pgrouting with the travel model in public transport (bus). I already have all the stops related to the table of ways (downloaded by osm2pgrouting) I have my ...
3
votes
0answers
178 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
121 views

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
79 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
57 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
115 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
323 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
56 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 ...
2
votes
1answer
222 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
81 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
355 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
28 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
29 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
130 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
2 3 4 5
16