Questions tagged [pgrouting]

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

pgRouting is an Open Source software add-on to PostgreSQL / PostGIS to find routes through road networks and solves general graph analysis problems.

Project homepage: http://pgrouting.org/index.html

144 questions
1
vote
0 answers

Installing pgrouting on macos

I am struggling getting the pgrouting extension to Postgresql to work. I am running PG 13 and attempting to install pgrouting 3.3.0. The hos OS is Mac Monterey 12.0.1 (M1). I have built pgrouting from source and all seems to go well. I had though to…
1
vote
1 answer

pgRouting pgr_TSP on a matrix table returns: A Non symmetric Matrix was given as input

I created a distance matrix table with pgr_dijkstraCostMatrix. This table is now holding 168.000.000 records. (id = integer, start_vid = bigint, end_vid = bigint agg_cost = double precision) I also have a points table (these are the points to…
Maas
  • 25
  • 5
1
vote
0 answers

How to solve the problem of same OSM ID of different Lat, Long pairs?

(I am not a native English speaker so please ignore my grammar mistakes.) I have a PostgreSQL database name as Karachi and I have downloaded osm karachi map from https://download.bbbike.org/ in shp file format then I converted it to GeoJSON using…
M.HUSSAIN
  • 153
  • 8
1
vote
2 answers

pgRouting with custom network?

I have a cost network, but it's not a street mapping network. I know the nodes and edges as I defined them. pgRouting looks like a good choice, but every single example I can find uses Open Street Map as the data. I don't have GPS coordinates. The…
Chris Kessel
  • 5,583
  • 4
  • 36
  • 55
1
vote
0 answers

How can I optimize dijsktra path finding query for speed

Through postgresql, postgis, pgrouting and nodejs I am working on a project which basically finds a path between shops. There are three tables in my database 1.CREATE TABLE public."edges" (id int, name varchar(100), highway varchar(100), oneway…
M.HUSSAIN
  • 153
  • 8
1
vote
0 answers

pgr_dijkstra resulting dashline road

I am trying to use pgr_dijkstra on postgis pgrouting by following code as below SELECT seq, node, edge, cost_len as cost, agg_cost, geom FROM pgr_dijkstra( 'SELECT gid as id, source, target, st_length(geom, true) as cost FROM…
reyalino
  • 157
  • 1
  • 1
  • 5
1
vote
1 answer

pgr_drivingDistance with flexible distance value on each route

I would like to calculate a graph similiar to an isochrone using pgsql. Therefore, I already used the algorithm pgr_drivingDistance. You provide a starting point and a distance value and receives an isochrone. The output using the algorithm is…
isikl
  • 11
  • 4
1
vote
1 answer

Why are there tag keys missing when downloading OSM data to Postgis / Postgresql?

I'm working on a routing application using OSM data in pgrouting. I'm using overpass-api to access the data from a specific bounding box. However, after downloading the data, there seem to be tag_keys missing from the data. When inspecting the data…
1
vote
1 answer

Architecture Design for Bus Routing with Time

This is to confirm if my design is good enough or get the better ideas to solve the bus routing problem with time. Here is my solution with the primary steps given below: Have one edges table which represents all the edges (the source and target…
Royal Pinto
  • 2,869
  • 8
  • 27
  • 39
1
vote
1 answer

rows_where argument not passed to pgr_nodenetwork

I am using the pgr_NodeNetwork function of the pgrouting extension to process a table that contains linestring geometries (essentially, roads). The syntax is the following : select pgr_nodeNetwork(edge_table:='my_table',…
R. Bourgeon
  • 923
  • 1
  • 9
  • 25
1
vote
1 answer

Argument in pgr_createTopology() function as query

I am using pgrouting 2.1.0. I have spatial and non-spatial data in different table(in different schema). Here I am creating a view which contain geom(filled), id(filled) source(blank) and target(blank). I have tried pgr_createTopology() function…
Bharti Mohane
  • 661
  • 7
  • 19
1
vote
2 answers

how to get the distance of sequence of nodes in pgr_dijkstra pgrouting?

I have an array of integers(nodes or destinations) i.e array[2,3,4,5,6,8] that need to be visited in the given sequence. What I want is, to get the shortest distance using pgr_dijkstra. But the pgr_dijkstra finds the shortest path for two points,…
Ayaz49
  • 325
  • 2
  • 4
  • 18
1
vote
1 answer

How to export OSM to database with all cities and street names?

I download osm map of my county and create spatial pg database. Osm file I've exported over osm2pgrouting with this command: osm2pgrouting -f myCity.osm -c mapconfig.xml -d postgis_db -U postgres -W postgres --addnodes --clean after exporting…
Aligator
  • 737
  • 2
  • 10
  • 23
1
vote
0 answers

How to get correct pgRouting results

I am trying to get pgRouting based on OSM data to run and have some problems in getting it right. I installed PostgreSQL 9.5 on an Ubuntu machine. PostGIS_full_version comes back with "POSTGIS="2.2.2 r14797" GEOS="3.4.2-CAPI-1.8.2…
TomGeo
  • 1,213
  • 2
  • 12
  • 24
1
vote
0 answers

pgrouting all_pairs -> search till set threshold distance on very large graphs?

Is there an efficient manner to use pg_routing to do an all-pairs shortest path search but only up to a certain distance? My use-case is large road network but I only want to search for shortest paths from one node to another where the path doesn't…
songololo
  • 4,724
  • 5
  • 35
  • 49
1 2
3
9 10