[pgrouting-users] Pgrouting-users Digest, Vol 131, Issue 2

Matteo Ruggieri matteoruggieri91 at gmail.com
Sun Nov 15 13:22:10 PST 2020

Hello Rajat and Marcus,
I really apologize if I answer several days late but I had commitments and
not born that I also tried a full immersion with pgrouting. I tried to
understand a little better postgis and pgrouting and I must say that it is
really incredible.
I tried to follow the available workshops and documentation. They allowed me
to take some steps forward even though I understand English very well, I
have some difficulties to fully understand some procedures. 
Anyway, I wrote this with TSP and pgr_dijkstracostmatrix:

SELECT * FROM pgr_dijkstraCostMatrix(
'SELECT gid as id, source, target, cost, reverse_cost FROM
(select array_agg(id) from public.ways_vertices_pgr where id in
(729,203,314,579,621,719)), directed := false)
start_id := 729,

randomize := false

I took only very few nodes to do an initial test and the query gave me a
positive result with node1 which turns out to be both initial and final

I don't know if this is the right procedure to try somehow to simulate the
routing of a vehicle (at the moment I am only interested in trying to write
the algorithm correctly) but the biggest problem that stops me is that I
don't know how to do the join between the_geom column (obtained thanks to
the work done by osm2pgrouting) and the algorithm that I wrote so that I can
display the result on QGIS with DBmanager. I was able to do the join with
the simple algorithm of the shortest path, but now here is not what to write
and I got a bit lost.

thanks for the help you are giving me and I hope you guys are ok.



Sent from: http://osgeo-org.1560.x6.nabble.com/pgRouting-users-f5197103.html

More information about the Pgrouting-users mailing list