1

I have PostgreSQL 9.2 with Pgrouting extension, but when I want to call a function(pgrouting) does not work.

Id like to compute the shortest path between two point.

SELECT gid, AsText(the_geom) AS the_geom
        FROM shootingstar_sp('geom_way', 281346, 280088, 0.1, 'length', true, true);

result:

ERROR: function shootingstar_sp(unknown, integer, integer, numeric, unknown, boolean, boolean) does not exist
SQL state: 42883

I did it same way with astar_sp_delta(); I got same result...

Thanks

  • Try SELECT pgr_version(); Any error mean you don't have pgRouting or it extension. – Magno C Feb 6 '14 at 14:52
  • I got this: (2.0.0,pgrouting-2.0.0,0,d6ed2cb,master,1.46.1) – Balazs Feb 6 '14 at 15:03
4

Seems you haven't configured your enviroment.

According this http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ you must, after install pgRouting, configure the extension:

CREATE EXTENSION pgrouting;

SELECT pgr_version();

EDIT:

Follow this link: https://github.com/pgRouting/pgrouting/wiki/2.0-Development-Guidelines-and-Standards

and you'll see:

shooting_star/ - Shooting star **DEPRECATED** This will likely get removed.

May help: http://docs.pgrouting.org/dev/src/common/doc/legacy.html

http://m1.archiveorange.com/m/att/pF04x/ArchiveOrange_jp2W2cZpN4YFMAOQon7K8Ex5Z3Aa.pdf

  • I got this result: (2.0.0,pgrouting-2.0.0,0,d6ed2cb,master,1.46.1) – Balazs Feb 6 '14 at 15:01
  • See my edit, please. – Magno C Feb 6 '14 at 15:05
  • ok. I see but astar_sp_delta() not working too. – Balazs Feb 6 '14 at 15:16
  • Is pgr_createTopology and pgr_dijkstra working? – Magno C Feb 6 '14 at 15:24
  • ERROR: function pgr_dijkstra(unknown, integer, integer, numeric) does not exist LINE 2: FROM pgr_dijkstra('geom_way', 281346, 280088, 0.1); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ********** Error ********** ERROR: function pgr_dijkstra(unknown, integer, integer, numeric) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. Character: 47 – Balazs Feb 6 '14 at 15:41
3

It seems you use pgRouting 1.05 function names with pgRouting 2.0 Please look at the documentation for the correct syntax, for example for Dijkstra Shortest Path.

The workshop might be also useful to get started.

Here is a list of major changes with pgRouting 2.0. For example it says, that "Shooting Star" algorithm has been removed and was replaced with TRSP.

  • I loaded pgrouting .sql and legacy files manually. Then I tried and always got this error ERROR: function pgr_astar(unknown, integer, integer, numeric) does not exist LINE 2: FROM pgr_astar('vw_szeged_utvonal', ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. However I can see all functions in pgAdmin structure – Balazs Feb 8 '14 at 14:45
  • Sorry, legacy.sql is not tested well. It may work, or it may help to identify changes. – dkastl Feb 9 '14 at 2:28
  • @Balazs : Can you accept an answer just when it's solves your problem? You've unaccepted my answer causing my reputation to down. Now I have a big red "-15" in my reputation. Now you're doing the same thing on this answer without having a solid result. Please don't be frivolous. – Magno C Feb 12 '14 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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