Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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?

share|improve this question

marked as duplicate by underdark Mar 31 '14 at 13:47

This question was marked as an exact duplicate of an existing question.

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:

share|improve this answer
Translated link to the funtion in 000537.html via Google Tranlate. – RyanDalton Apr 20 '12 at 21:18
Dead links!!!!! – Donny V. Feb 6 '13 at 14:19

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');

share|improve this answer
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 – Route Maker Feb 10 '12 at 17:41
I don't know how to write these messages "Head west on", "Take the 2nd right", "Continue to folow" etc. – Route Maker Feb 10 '12 at 17:48

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