New answers tagged pgrouting
1
There is a handy function currently in pgRouting's develop branch coined dijkstraNear. This will help you compute many to many.
pgr_dijkstraNear(Edges SQL, Start vids, End vids [, directed] [, cap], [global])
RETURNS SET OF (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)
OR EMPTY SET
0
You can do some string concatenation
...
SELECT SUM(roads.km)
FROM pgr_dijkstra(
'SELECT id, source, target, cost, reverse_cost FROM roads
(
SELECT ST_Expand(ST_Extent(geom_way), 0.1) as box
FROM roads
WHERE source = (SELECT source FROM roads WHERE id = 923342)
OR target = (SELECT target ...
Top 50 recent answers are included
Related Tags
pgrouting × 829postgis × 404
postgresql × 232
openstreetmap × 102
routing × 98
qgis × 80
osm2pgrouting × 79
osm2po × 64
postgis-2.0 × 35
dijkstra × 34
sql × 28
network × 26
shortest-path × 25
osm2pgsql × 18
geoserver × 16
topology × 15
route × 15
openlayers-2 × 14
installation × 14
openlayers × 11
isochrone × 10
ubuntu × 9
distance × 8
astar × 8
travelling-salesman × 8