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
0
votes
0 answers

How to find the shortest path using pgRouting and OSM with certain constraints?

I'm kind of newbie in those spatial matters, but it doesn't seem to be a trivial issue. Let's assume I have data about my city from OSM in my PostGIS database and I want to find the shortest path from point A to point B for a cyclist. The problem is…
0
votes
1 answer

pgr_trsp - applying restrictions with no consideration to their cost

I'm trying to solve a common problem which is railway routing, thus enforcing several turn restrictions, e.g.: "Cannot go from EDGE A to EDGE B via NODE c" Trains cannot do sharp turns and other stuff, so what I have now is a list of source and…
catacavaco
  • 55
  • 1
  • 1
  • 10
0
votes
1 answer

What metric does pgrouting use to calculate distances?

I was comparing distances between points using pgrouting and comparing it with Vincenty and great circle distances computed using geopy, but I'm finding that the min distance between two points is lower bounded by the pgrouting distances. This makes…
ell
  • 13
  • 3
0
votes
0 answers

pgrouting not find routes

Having in hand the shape of the road and rural roads in the target region, followed the workshop documentation is available in pgrouting the site, I created the required fields, ran the pgr_createTopology, and other verification queries…
Franklin Januário
  • 125
  • 2
  • 2
  • 7
0
votes
0 answers

SELECT query not working is pgrouting

I was just going through this tutorial HERE, its about pgrouting and basically when i run the following command: SELECT * FROM types ORDER BY id; I get an error saying SELECT: command not found, in the documentation the following is said: Note …
Alexander Solonik
  • 9,838
  • 18
  • 76
  • 174
0
votes
1 answer

pgrouting error when trying to dump data into database

I was just following this tutorial HERE, its about, pgrouting, When I run the following command: psql -U user -d postgres -f ~/Desktop/pgrouting-workshop/data/sampledata_routing.sql I get an error saying the following:…
Alexander Solonik
  • 9,838
  • 18
  • 76
  • 174
0
votes
1 answer

How turn restrictions in k-shortest paths algorithm in pgRouting

I want to turn restrictions in k-shortest paths in pgRouting. I calculate one path using pgr_trsp function now, but it gives only one route. I need several shortests paths and turn restriction.
Evgeny Ekim
  • 241
  • 3
  • 13
0
votes
2 answers

Way to calculate road distances in a city very quickly

So I have a set of points in a city (say houses or residences) and I want to find the shortest distance between these points and a set of candidate points for a store. I am looking for the best store locations that will minimize the distance to all…
krishnab
  • 9,270
  • 12
  • 66
  • 123
0
votes
2 answers

pgr_createTopology says no function matches

I know the attributes have to be in a certain order which I checked. Also the manual says it was renamed in version 2.0 but i can't see a difference. SQL error: function pgr_createtopology(unknown, numeric, unknown, unknown) does not exist LINE 1:…
missmaths
  • 1
  • 3
0
votes
0 answers

After osm2pgrouting disappeared street segments

I'm download osm-file with some city. In QGIS this map looks good, all streets is connected. Next, i execute osm2pgrouting and in QGIS (when i connect to postgres db) i watch map without some segments in street. Therefore, find path not worked (i…
den
  • 1
  • 2
0
votes
1 answer

PostgreSQL optimization: Select road edges where start and end vertex is in some set

The pgRouting pgr_drivingDistance function returns only ids of road network vertices, but without ids of road edges in specific drive time. To find this road edges I created the query: SELECT all_roads.id, the_geom FROM ( …
Marcin
  • 123
  • 4
0
votes
1 answer

PostgreSQL - PostGIS query optimization

I have a query which creates an input to pgRouting pgr_drivingDistance function: CREATE TEMP TABLE tmp_edge AS SELECT e."Id" as id, e."Source" as source, e."Target" as target, e."Length" / (1000*LEAST("Speed",…
Marcin
  • 123
  • 4
0
votes
1 answer

Using pgrouting on Android front End

I have an OSM/PSQL/PGROUTING environment where I also have my routing functions allocated in. Now I want to develop an API to calculate routes using my DB and send the map + route (Like google maps). It has to be done for Android use, is it…
cpfp
  • 377
  • 1
  • 4
  • 15
0
votes
1 answer

pgRouting stopped working after database backup

I have these two tables in postgresql , PATHWAY , and the vertices table that i created using pgr_createTopology, called PATHWAY_VERTICES_PGR. Everything was great until i decided to backup the database to restore it later, now that i have restored…
catacavaco
  • 55
  • 1
  • 1
  • 10
0
votes
2 answers

How to set street obstructed in planet_osm_line/pg_route

I am working on a project where we are going to be looking at finding the shortest/fastest route from point A to point B. I've been looking at the tables generated by the osm2pgsql. And I'm wondering how would I represent a road obstructed after…
Jeremy
  • 935
  • 5
  • 18
  • 33