Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

2 Answers

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

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

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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