Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Here are the steps i did:

  1. Added ppa to repository sources
  2. in synaptic marked all pgrouting for postgres 8.4
  3. apply (everything was ok)
  4. restarted postgres

But, i just tried a simple function shortest_path and it seems to do not recognise it:

ERROR: function shortest_path(text, integer, integer, boolean, boolean) does not exist LINE 1: SELECT * FROM shortest_path('

This is the query:

SELECT * FROM shortest_path('SELECT gid as id,source::integer as source,target::integer as target,length::double precision as cost FROM topologia'::text,1, 2, false, false);

It should be simple... anything else that I'm missing?

Cheers, Marco

share|improve this question
add comment

1 Answer

I just found the solution.

After the steps above, one has to actually add the functions to the postgresql database:

$ sudo su postgres

$ psql -d routing -f /usr/share/postlbs/routing_core.sql

$ psql -d routing -f /usr/share/postlbs/routing_core_wrappers.sql

$ psql -d routing -f /usr/share/postlbs/routing_topology.sql

I hope this useful for someone else...

share|improve this answer
    
Yes, I made the same mistake a few months back with ubuntu Maverick! –  winwaed Mar 30 '11 at 13:18
    
You can accept your own answer too. –  underdark Mar 30 '11 at 19:08
add comment

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.