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

learn more… | top users | synonyms

0
votes
0answers
2 views

osm2po pgrouting giving wrong result

I'm trying to calculate the shortest path between two locations using OSM data (inserted in a database using osm2po) and pgrouting. Here is the query I used : SELECT x1,y1 FROM pgr_dijkstra(' ...
4
votes
1answer
566 views

pgRouting 2.0 slow execution of A star algorithm

Recently, I wanted to test pgRouting ver. 2.0. I created the database structure with osm2po and imported UK map from geofabrik. The data was imported correctly. When I execute a sample query in ...
1
vote
0answers
16 views

Output shortest route shapefile using pgRouting and JSON data

I'm interested in finding the shortest route between two sets of bike share stations (22/21 stations each) in the city of Glasgow. Note, I need to overlay the final shapefile onto an OSM basemap in ...
2
votes
1answer
15 views

Geometry route in pgr_tsp

I currently use pgr_tsp and returns the list (apparently) correct. But I find no reference on how to get the lines that make up the optimal route. Is it possible that can help me? I only need to ...
2
votes
2answers
49 views

How to extract shortest path from floydwarshall algorithm pgrouting

I've tried Floyd-Warshall algorithm using pgrouting with the following code; SELECT * FROM pgr_floydwarshall( 'SELECT gid AS id, source, target, meters AS cost FROM jalan') ...
1
vote
1answer
19 views

May I use OSM in pgRouting to determine TSP solution?

I have a TSP problem that I'd to determine if my solution path is correct. As stated, a classic TSP, I have a number of locations (bikeshare stations) within a city centre (Glasgow, Scotland) that I'd ...
0
votes
1answer
208 views

Issue using pgr_dijkstra from Postgres pgRouting

I am using Postgres with Postgis extension to retrieve streets (only for pedestrian use) and several "natural" points. I need to make updates every minute and i am working on a small bounding box. For ...
0
votes
1answer
179 views

Repair topology before pgrouting / No results of pgrouting

My goal is to calculate lots of distances along the streets. I followed http://workshop.pgrouting.org/ tutorial except that I used osm2po instead of osm2pgrouting to import osm file. The only problem ...
1
vote
1answer
299 views

Pass coordinates parameters to geoserver pgrouting service from Leaflet wms tile layer

I've configurated a pgRouting service in Geoserver, following the steps on the documentation it's easy to accomplish. Reading the documentation, existing examples, etc.. I've come to undestand how ...
2
votes
1answer
39 views

Seeking updated pgRouting Tutorial?

Is there an updated pGRouting tutorial to this: https://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ Trying to following it using QGIS 2.14.0 Essen + PostgreSql 9.5 (pgAdmin ...
0
votes
1answer
59 views

How can I change start and end point of a linestring?

I have a linestring from a pgRouting query. The start point and/or end poit of this line does not connect exactly the points I've clicked on the road and give me all the road segment of that edge (...
0
votes
0answers
22 views

line_locate_point: 1st arg isnt a line

i used this query for routing procedure SELECT pgr_nodeNetwork('edges', .006); I am following this workshop http://workshops.boundlessgeo.com/tutorial-routing/ and this is the error, I can't ...
0
votes
2answers
288 views

PostGIS pgr_dijkstra function does not find node that appears in ways table

I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths ...
4
votes
1answer
241 views

Error installing PGRouting database extensions

Im trying to install pgRouting and I cannot reach the end of the way because of the following error: psql:/home/user/share/postgresql/contrib/pgrouting-2.0/pgrouting.sql:2459: ERROR: could not load ...
0
votes
1answer
15 views

update pgrouting from 2.0.0 to 2.2.0 due to malfunctioning

I have postgresql 9.1 and postgis 2.0 on ubuntu 12.04 currently installed, but when I try to execute the following command: psql -d routing_test ALTER EXTENSION pgrouting UPDATE TO "2.2.0"; output ...
1
vote
1answer
20 views

Return result of pgr_dijkstra() in pgrouting 2.2

I am testing pgr_dijkstra() in pgrouting 2.2, but got columns (seq, id1, id2, cost) in the return result rather than columns (seq, path_seq, node, edge, cost, agg_cost) as described in the pgrouting 2....
4
votes
1answer
262 views

Solving “Traveling Purchaser Problem”

Till now, I was using PostGIS-pgrouting pgr_tsp function to solve Travelling Salesman Problems. This function can give us the best possible route depending upon the cost parameter when the starting, ...
0
votes
0answers
13 views

How are cost and reverse cost computed in pgrouting?

I downloaded the nyc osm metro extract from Mapzen. I then used osm2pgrouting to import that data into postgis, pgrouting and now I have all these columns cost and reverse_cost, but I'm not sure how ...
0
votes
2answers
780 views

PostGIS ERROR: function x(geometry) does not exist

I am using the following postgis query for updating a pgrouting table from my custom road data. In the x(ST_StartPoint(part_geom)) as x1, line its returning an error mentioned ERROR: function x(...
2
votes
1answer
75 views

Why pgRouting GUI panel may not work in QGIS?

What could be the reason behind the mal-functionality of the pgRouting Layer GUI panel? In order to route shortest path via dijkstra function code I'm able to conduct the task using the following ...
0
votes
1answer
48 views

Using pgRouting through PostgreSQL

I followed the guideline from this tutorial to use pgrouting through PostgreSQL but I can't understand the first instruction: CREATE OR REPLACE VIEW road_ext AS SELECT *, st_startpoint(the_geom), ...
0
votes
1answer
243 views

Installing pgrouting on mac os x

Regarding installing (build) pgrouting I could install pgrouting-2.0.0 by using a command brew install pgrouting and following this Build manual: http://docs.pgrouting.org/2.0/en/doc/src/installation/...
1
vote
0answers
34 views

Pg_dijkstra empty results

I am currently working on PgAdmin, and the pgrouting extension, in order to get the length and the path of the shortest path between every LNG terminal over the world (I have them as a table of points)...
0
votes
1answer
23 views

pgr_drivingdistance returning no results

I've imported the latest North America OSM extract into postgres using osm2po so that I can use the pgr_drivingDistance function of pgRouting to create a drive-time polygon. I'm at the final step, ...
1
vote
1answer
219 views

How to update the OSM data in a PGRouting Database built with osm2pgrouting?

I'm using a PGRouting database originally built with osm2pgrouting from a *.osm file downloaded from Mapzen. If I want to update the OSM data in that database, ie. re-build my PGRouting Database, ...
1
vote
1answer
71 views

How to add more vertexes to a LineString

I created a map of LineStrings using QGis and then it was exported to a Postgis DB, then I used the query below in order to create the vertexes in the map so it could be used with the functions of ...
2
votes
1answer
2k views

How to install PostGIS and pgrouting on Windows if Stack Builder fails to connect?

I know this has probably been covered and that there are plenty of guides out there, but for the life of me I cannot get pgrouting installed. All guides/how-tos are different or assume prior knowledge....
3
votes
1answer
252 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
0
votes
1answer
71 views

Return nodes along portions of edges with pgrouting

I have been experimenting with generating isochrones with pgrouting using osm data. So far, I have been able to generate isochrone polygons by getting the concave hull of the nodes returned from the ...
0
votes
0answers
13 views

Topology processing after osm2pgrouting?

I imported an OSM dataset using osm2pgrouting, and checked the topology like this: pgr_sfbay=# select pgr_analyzegraph('ways', 0.001, id:='gid'); NOTICE: PROCESSING: NOTICE: pgr_analyzeGraph('ways'...
3
votes
1answer
48 views

Create an optimised path between nodes avoiding polygons entities

I have a point shapefile representing seaports. I have the linear cost of shipping for every seaport pairing (specific shipping cost to go from one point to another point). I want to find a way of ...
0
votes
1answer
23 views

Creating Drive Time Polygons Across State Boundaries Using OSM?

I am using pgRouting on OpenStreetMaps to create drive time polygons. The challenge is that at state boundaries, these polygons effectively stop, since the roads in OSM are segmented at the state ...
3
votes
1answer
137 views

Drawing historical shipping routes?

I´m working on a project where I have to draw historical shipping routes of trade, whaling, etc. ships from the XIX century. I´ve done some research and checked Maritime route prediction avoiding ...
2
votes
3answers
157 views

How to get the nearest points from pgrouting linestring result?

I'm trying to get the points or landmarks nearest to the result of pgrouting linestring( the shortest path ). I'm using OSM map entities and working with planet_osm_point. Here's my code: SELECT ...
1
vote
1answer
63 views

PostGIS: How can I improve the response time for getting the routed distance between addresses?

I need the ability to calculate the driving distance between two addresses for possibly hundreds of thousands of records. I have decided on PostGIS because it can geocode and perform routing all in ...
0
votes
1answer
41 views

pgRouting - How get all pubs that are less than x meters from a point

I'm building a Mobile App to discover all pubs that are less than 2 km away from my position! First I obtained all the roads of a town using Open Street Maps "osm2po" Next I obtained all ...
0
votes
0answers
37 views

Problem with loop for pgr_Dijkstra

I try to use pgr_Dijkstra through Postgis and Pgadmin to find the shortest path in a network between a lot of nodes. So I thought I could to "automate" the process with a PLSQL query. Here is a query ...
9
votes
3answers
1k views

Why is any pgr_* routing function taking forever based on OSM data in an pgrouting enabled DB

I loaded the German OSM dataset into the pgrouting DB by using osm2po 4.7.7. Everything works fine i have osm2po set up via it's config and it's working like a charm through it's Java part. I had the ...
0
votes
2answers
53 views

successful import of osm2po results

I would like to know if my import of some osm2po results into a PostgreSQL database have been successful or not. Is there something like: 'Import successful' or a simple 'Done'? All I got was: ...
5
votes
5answers
630 views

Improve performances on distance coverage routing - PostgreSQL

I have to create layers of land coverage from one point to anywhere around on a given street network for a given distance (ex: FROM house, DISTANCE 30000m) An important factor to understand; I need ...
0
votes
1answer
78 views

Alpha Shapes in pgRouting - missing FROM-clause

I am attempting to follow Anita Graser's post on creating alpha shapes in pgRouting. The article was written several years ago, so some of the functions have been updated and names have changed. I ...
1
vote
2answers
51 views

How does pgr_createTopology assign source and target?

This is the first time I post a question here. I was following the tutorial from Anita Graser http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ , on a roads table which ...
0
votes
2answers
323 views

Encoding error when importing to PostgreSQL using osm2po SQL file

After running osm2po on a pbf file for Europe I am importing the resulting files into a PostGIS and pgRouting enabled database. During the import psql it reporting many encoding errors because the ...
3
votes
1answer
88 views

How to loop in PostGIS to add the next lat long to a route

I want to loop over the results of a query and then pass row(n)'s longitude, latitude and row(n+1)'s longitude and latitude to another function. I have a query which returns a set of coordinates from ...
1
vote
0answers
37 views

pgRouting problem: creating topology where segments touch

I am working my way through the example in the pgRouting manual (2.2). After running pgr_createTopology() and pgr_analyzeGraph(): pgr_test=# SELECT pgr_createTopology('edge_table',0.001); NOTICE: ...
1
vote
0answers
13 views

Single WMS pgRouting Layer from Array of Lat Longs

I am using the following loop for displaying the a bus route. 'stopLonLat' is a JavaScript object with all the latitude and longitude values of various bus stops. Since I am not looking for shortest ...
0
votes
2answers
37 views

Does pgrouting support multi-modal routing?

Is it true that pgrouting cannot handle public transport routing as it does not support multi-modal routing? Can we do it by some workarounds?
3
votes
1answer
42 views

pgrouting: how to temporarily increase some edges' cost without affecting concurrent queries?

How to temporarily increase some edges' cost for one query without affecting other concurrent query? The case is, I would like to develop a system that allows users to query the shortest path of a ...
1
vote
2answers
786 views

How to install pgRouting in Ubuntu 14.04?

I want to install pgRouting in Ubuntu 14.04 LTS. I added the respective repository (https://launchpad.net/~georepublic/+archive/pgrouting-unstable?field.series_filter=trusty) but failed to install the ...
0
votes
0answers
25 views

Problem with projection in pgRouting layer in GeoServer

I followed this tutorial for creating a pgRouting layer in GeoServer. When I try to publish this layer Native Bounding Box and Lat/Lon Bounding Box are not getting generated correctly. For my road ...