4

I have route list as result of pgRouting with street names. How to get messages "Turn left", "Go along" etc ... Can pgRouting do this or I need some other source and which?

0

2 Answers 2

0

I think this has been discussed a few times already, see:

If you are able to translate this from Italian, you may even use the function posted here: http://lists.osgeo.org/pipermail/pgrouting-users/2011-January/000537.html

2
-2

Do you have Edge (topology) setup in your postgis database?

Example pgRouting gives the ability to create the source-target (start-end nodes) information within PostgreSQL using assign_vertex_id():

SELECT assign_vertex_id(table_name, snapping_range, geometry_column_name, edge_id_column_name);

where table_name is the name of the edges table, nodes within snapping_range (value is in your current projection units) will be snapped, geometry_column_name is the name of the geometry column (usually ‘the_geom’), edge_id_column_name is the name of the edge id column (usually gid).

This function requires ‘source’ and ‘target’ integer fields.

ALTER TABLE ways ADD COLUMN source integer;
ALTER TABLE ways ADD COLUMN target integer;
SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');

http://www.pgrouting.org/docs/howto/topology.html

2
  • I have all of this. I finished with routing, I have PgRouting Shorthest path output as gid and street name. But I want to have output like Google 1. Head west on 330th St toward Wagonwheel Rd 0.8 mi 2. Take the 2nd right onto US-56 E/​US-77 N Continue to follow US-77 N 10.4 mi 3. Turn left onto KS-4 W 28.7 mi 4. Turn right onto KS-4 W/​S Gypsum Valley Rd 1.0 mi 5. Turn left onto KS-4 W 10.0 mi Feb 10, 2012 at 17:41
  • 1
    I don't know how to write these messages "Head west on", "Take the 2nd right", "Continue to folow" etc. Feb 10, 2012 at 17:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.