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
1 answer

Split lines of OSM road network after OSM2PO import for creating a catchment with pgrouting

I want to create a catchment with pgrouting based on an osm.pbf file. After importing the pbf-file with OSM2PO the calculation of an catchment with pgrouting works fine. But for a more detailed result it would be nice to split all longer roads at…
Martin
  • 39
  • 6
0
votes
1 answer

ERROR: more than one row returned by a subquery used as an expression

I am doing an example from the pgrouting a Practical Guide book but with my own tables and I have run into this error. I have used LIMIT 1 to avoid this error as the example in the book does, but there must be another error. Any ideas on the…
kyle
  • 1
0
votes
1 answer

Error when i'm creating new sql view in geoserver : function wrk_fromatob() does not exist

hellow, I'm learning to create a routing application with this new workshop. This is using Postgres as the database, and its extensions PostGIS and pgRouting. It uses GeoServer to manage data and publish that. I got data from osm and then added it…
Mahdi Nazari Ashani
  • 372
  • 1
  • 5
  • 22
0
votes
1 answer

pgrouting / postgis - algorithm for searching intermediate points

I am facing a subproblem, where I got database (with postgis, pgrouting) of my city. I need to make a path / route from point A to B. If this path is longer than xx kilometres then this path has to visit one of given "stop point" (lets call it C).…
user3613919
  • 777
  • 1
  • 7
  • 17
0
votes
1 answer

Turn-by-Turn Navigation instruction from pgRouting Heading Android

I am using pgRouting request so i get the heading result of each edge. I want to show turn by turn message when the distance between my current position and the start of the next edge is less than 50 meters. I do this inside the onLocationChanged…
0
votes
1 answer

pgrouting - Choosing an algorithm with a predominance for a specific type of road

I would like to use one of pgrouting's algorithm to find the (shortest) path between 2 points with: (a) predominance for a specific type of road and (b) intemediate points. To build the data I used the osm2pgrouting. I would like to focus first on…
user3613919
  • 777
  • 1
  • 7
  • 17
0
votes
2 answers

Pgrouting in postgres - cannot create extension

I installed postgres with EDB installer. I wanted to use pgrouting in my database. So I downloaded it through homebrew brew install pgrouting Next, I wanted to initalize it in my database: psql mydatabase -c "create extension pgrouting;" But I got…
user3613919
  • 777
  • 1
  • 7
  • 17
0
votes
0 answers

How do I install pg routing to an existing postgresql 9.1 database

I installed postgresql 9.1.12 using sudo apt-get install postgresql-9.1 postgresql-9.1-contrib postgresql-9.1-postgis and created databse "mydb". Then extended the mydb using psql -h localhost -d mydb -U abc -f…
Adithya
  • 1,687
  • 3
  • 19
  • 34
0
votes
1 answer

Remove a node from a network without affecting the interaction of others nodes

This is a sample of my big graph: And i want to remove the node "B" without affecting the interaction of other nodes: I worked it with "R", "PgRouting","gephi" and "networkx". And I dont found an efficient way to do it. Any suggestion?
derive111
  • 143
  • 2
  • 10
0
votes
2 answers

Get distance of fastest path with pgr_drivingDistance

I created a routing network based on OSM with OSM2PO in PostgreSQL with the extension pgrouting. I have got a column km (distance in km), a column cost (driving time) and max_speed. I try to create a catchment with the function pgr_drivingDistance…
Martin
  • 39
  • 6
0
votes
1 answer

column "pedroad.id" must appear in the GROUP BY clause or be used in an aggregate function

select di.seq, di.node , di.edge , di.cost, a.geom from pgr_dijkstra( 'select id, target, source, sum(cost) from pedroad', array(select get_source2('location1')) ,array(select get_target2('test4')) ,false) as di, pedroad a …
andrew
  • 135
  • 1
  • 1
  • 8
0
votes
2 answers

SQL: How to get source/target of given coordinates in a line shapefile in PostGIS table?

I loaded a line shapefile in PostGIS and used pgr_createTopology in pgRouting to make the table routable by adding source and target (assign 2 end nodes of the line source number and target number). The following figure was part of the table: Now I…
Heinz
  • 2,415
  • 6
  • 26
  • 34
0
votes
1 answer

Use OSM for routing in GeoServer (The best practise)

I am new in OSM but now I need create application which will use GIS (Geoserver) and will be provide service to get road from point A to point B. I found some informations about this but I still have any questions. My is download open street maps…
Aligator
  • 737
  • 2
  • 10
  • 23
0
votes
1 answer

Find and return polygons which path/route goes through in PostGIS

Hi I am challenged with finding the polygons which a path, returned as a multilinestring, crosses or drives through. So if I have to travel from A to B then I have to count and return all the polygons that I visit, including the polygons A and B are…
Yantes
  • 251
  • 3
  • 18
0
votes
1 answer

performance of pg_routing with exact location

pg_routing find shortest path from a start and an end point which are exacts vertexes on ways (the nodes), but there's no proper solution when we want to find the shortest path for locations which are not on the ways (like POI, exacts addresses,…
LionelR
  • 361
  • 1
  • 3
  • 12