Questions tagged [pgrouting]
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
899
questions
1
vote
0
answers
30
views
pgrouting or recursive question?
For a water network, I'd like to count the users and accumulate them. I look at
Here's what I've got:
and I'd like to get (done by hand):
however, with a recursive query, I'm afraid of counting ...
3
votes
1
answer
54
views
Vertices table generated by pgr_createTopology() doesn't have enough vertices
I get 7639 points using st_startpoint and st_endpoint, however the vertices table generated by pgr_createTopology only have 2393 points.
The red points are generated by pgr_createTopology, and the ...
1
vote
0
answers
47
views
pgr_nodeNetwork returns old_id as int and not bigint
I am using pgr_nodeNetwork('edges', 0.001, 'id', 'geom', 'noded', '', f) to create the paths network. Since the table is being re-generated multiple times the value of old_id in resulting table have ...
0
votes
0
answers
48
views
QGIS automate creating equally long routes from a line street layer
I have the task of designing routes within a street line layer that have similar lenght and are designed to drive along each road once. This is for purpose of conducting a survey where each street ...
1
vote
1
answer
50
views
Cannot cancel pg_routing query in local database
I have tried to cancel the hung query after a pg_routing query, but cannot. I have encountered this problem previously with pg_routing, but ended up really messing up the local database and had to ...
2
votes
1
answer
58
views
pgr_createTopology not working is dynamic sql code
I have the following dynamic sql query (left out many lines of code before this, but it works up to the pgr_createTopology element for creating the topology of an extracted stream network based on the ...
1
vote
0
answers
52
views
pgrwithpointscost returning empty table
I have a road network and points along the road network that I would like to calculate the distances of the points from beginning to end. Previously @geozelot helped me with a similar problem, but ...
1
vote
1
answer
44
views
Using pgRouting function pgr_dijkstraCostMatrix
I am trying to use the pgr_dijkstraCostMatrix function in pgRouting for PostgreSQL to find the shortest paths between points in a road network. However, I keep encountering an error indicating that ...
2
votes
1
answer
78
views
pgr_withPointsCost returns incorrect table values
I have been struggling with getting pgr_withPointsCost to output a correct cost table for months. I have created a routable network, ensured the network is connected, created a poi table with all the ...
3
votes
0
answers
78
views
Fixing gaps in line network with pgRouting/PostGIS
I have a line network that I want to fix the gaps on (connect the edges). I have tried the following:
SELECT pgr_nodeNetwork('migration.streams', 0.0001, 'id', 'geom'); -- fix gaps and dead ends?
...
2
votes
1
answer
33
views
Expected type of geom is integer,smallint or bigint but USER-DEFINED was found
I have tried importing my multilinestring shapefile from both qgis and the shapefile loader into postgis, but it gives me the following error when running the following code:
SELECT pgr_createTopology(...
0
votes
1
answer
35
views
Create x1,y1,x2,y2 columns of pgRouting a* algorithm from a GeoJSON/shapefile
I have used pgRouting in PostgresSQL to routing using Dijkstra's algorithm. Now I need to do the same with a* algorithm, The A* algorithm needs x1,y1,x2,y2 values instead of geometry.
How can I ...
3
votes
0
answers
63
views
Am I using the right version of pg_routing
I am using PostgreSQL 13 (PostgreSQL 13.10 (Debian 13.10-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit) and when I execute
SELECT pgr_full_version();
...
1
vote
0
answers
41
views
Discrepancy in Routing Results Between pgr_TSP Versions (3.1.2 vs. 3.2.1) [closed]
I've been working with the pgr_TSP function in the pgrouting library, and I noticed a change in its behavior between versions 3.1.2 and 3.2.1. Specifically, it seems that in 3.2.1, the algorithm was ...
0
votes
0
answers
45
views
Road Restrictions with osm2po
I'm currently using osm2po version 5.5.5 to import data from OpenStreetMap (OSM) into a SQL graph file. My primary concern is to include restrictions on the roads during the import process. To achieve ...