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
66
votes
8 answers

Postgres SSL SYSCALL error: EOF detected with python and psycopg

Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected It only occurs when I add a WHERE column LIKE ''%X%'' clause to my pgrouting query. An example: SELECT id1 as node, cost…
Phil Donovan
  • 1,075
  • 1
  • 9
  • 18
6
votes
1 answer

Postgres Query Based on Previous and Next Rows

I'm trying to solve the bus routing problem in postgresql which requires visibility of previous and next rows. Here is my solution. Step 1) Have one edges table which represents all the edges (the source and target represent vertices (bus…
Royal Pinto
  • 2,869
  • 8
  • 27
  • 39
6
votes
2 answers

ERROR: function addgeometrycolumn is not unique

I am trying to use the following function; SELECT Assign_vertex_id('ways', 0.00001, 'the_geom', 'gid') but for some reason it is giving me the following error; NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial…
IT_info
  • 707
  • 4
  • 16
  • 36
5
votes
1 answer

GTFS based Transit Planning using PGRouting

I have followed below tutorial for setting-up OpenTripPlanner by importing GTFS data and it worked. http://docs.opentripplanner.org/en/latest/Basic-Tutorial/ But I have to integrate the trip planning on an existing GIS implementation which uses…
MobDev
  • 1,489
  • 1
  • 17
  • 26
5
votes
1 answer

pgRouting: route starting from closest node along edge

I am trying to find a way to route from the closest point on a linestring to my current location (lat, long). So far I am able to get the shortest path but it starts from the very beginning of the linestring (aka source). I am using…
Logan M
  • 348
  • 2
  • 12
5
votes
1 answer

SELECT pgr_nodeNetwork query fails

I am working on windows, and have enabled the extension postgis, pgrouting on database. I have postgreSQL 9.4 installed and i am using the data from boundless workshop (http://workshops.boundlessgeo.com/tutorial-routing/). SELECT…
Ahsan Mukhtar
  • 629
  • 10
  • 31
5
votes
1 answer

build a road network

I have various number of tracks which represents different roads. Each track represent one road. I have loaded this gpx file into my postgres. Now my problem is how am I going to build a network between all these roads, in order to be possible to…
IT_info
  • 707
  • 4
  • 16
  • 36
4
votes
1 answer

osm2pgrouting - Parsing data not well-formed (invalid token)

I need import open street maps data into my PostGIS database over osm2pgrouting tool. But when I run command, tables was created but without any data. Can you tell me what am I doing wrong? I have installed extension pgrouting in my db ... As…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
4
votes
2 answers

psycopg2.InterfaceError: connection already closed / pgr_astar

I am using psycopg2 to access a postgresql database from python. When I try to run the pgrouting function "pgr_astar" for the shortest path, I receive an error cur = db.cursor() psycopg2.InterfaceError: connection already closed Basically, what…
Antonin
  • 1,748
  • 7
  • 19
  • 24
3
votes
1 answer

How does shortest path work in pgrouting?

I'm trying to find how the implementation of shortest_path() in pgRouting works. This is the function definition: CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer,target_id integer, directed boolean, has_reverse_cost boolean) …
john
  • 31
  • 3
3
votes
1 answer

Pgrouting within a isolated boundary

I'm new to PostGis and exploring pgrouting features. The requirement is to trace assets within a floor. For example, Our data consists of few building, floor information and assets within the floor. Each building is isolated(not connected to each…
3
votes
2 answers

How to install pgrouting for postgres.app in mac

Any idea on how to install pgrouting for postgres.app in mac? I tried to restore a backup file and it's showing the following error: extension "pgrouting" does not exist
3
votes
2 answers

PgRouting in GCP Cloud SQL

Is there any good reason why the pgrouting extension is still not supported by GCP Cloud SQL? I mean, Cloud SQL even supports PostGIS 2.3 version. Also, considering I already have PostGIS 2.3 installed on Cloud SQL, is there any way I could install…
d4nielfr4nco
  • 635
  • 1
  • 6
  • 17
3
votes
2 answers

Where does ELOG messages go?

I'm working with a C Library, librouting_darp.dll which uses the function elog to log debugging messages of its processes. But I don't know where to look for the messages which the function is logging. Do you know where I can find those…
Laggel
  • 1,356
  • 3
  • 19
  • 36
2
votes
1 answer

Can at least some parts of pgRouting run in parallel with parallel query?

Objectives I would like to run pgr_dijkstra for each pair of vertices in a routable graph. I have a simple script that takes each pair of vertices and launches a pgr_dijkstra against the database. It would be nice to use PostgreSQL parallel query…
1
2 3
9 10