dijkstra (#16) - unlogisches ergebnis bei shortest_path_as_geometry (#153) - Message List

unlogisches ergebnis bei shortest_path_as_geometry

hallo ihr, ich bin gerade dabei, shortest_path A* mit meinen eigenen daten zu testen. eigentlich hat alles mit der db (postgresql8.2) anpassung geklappt. nun erhalte ich aber ein unlogisches ergebnis beim aufrufen der shortest_path_as_geometry() funktion. mein layer besteht aus 4 arcs, die eine art viereck bilden. wenn ich nun shortest_path_as_geometry() aufrufe und von start 1 zum benachbarten ziel 2 gehe will, geht er einmal rum(egal welche start/ziel kombination ich wähle. shortest_path_astar() funktioniert dagegen logisch von 1 nach 2 ok und von 1 nach 3 über 2. ich hoffe mein problem verständlich gemacht zu haben. vielen dank im voraus...lucky

  • Message #530

    How about posting in English?

    • Message #531

      ok..sorry please forget my first statement. my problem: i try to run the pgrouting A* with frida-data. i prepared my db and i think everything are ok. i can run shortest_path() and shortest_path_astar() and it looks fine. but when i try to run the the shortest_path_as_geometry() function i dont get a result. maybe this is the reason why i can't see any routes in the mapserver application. can you help me??? thank you...lucky

      • Message #533

        Which version of pgRouting do you use? If shortest_path() and shortest_path_astar() are OK, why do you need shortest_path_as_geometry()? As far as a I know, this function has been renamed in the newer versions after some code refactoring. Is there some documentation, which we forgot to change?

        • Message #534

          i use pgRouting 1.0.0a. i think i´ve to use the shortest_path_as_geometry()function to draw the routes in via mapserver in the mapfile?! to understand the routing i used your documentation "pgRouting (mit dem A*-Algorithmus) und UMN MapServer). in the php/mapscript routing_os_frida.phtml you use the shortest_path_astar2_as_geometry_internal_id() to get the start and end point. this function does´nt work. for that i use the shortest_path_as_geometry() direct in mapfile. sorry..for me is a little bit confuse. what is the best way to draw routes via mapserver in connection with list box for start and end point like frida-applikation? thanks a lot...i hope you understand my problem ...lucky

      • Message #535

        Do you have a geometry column in your data set? Can you post your table scheme here?

        • Message #537

          yes i have. here the definition of my dataset frida


          CREATE TABLE frida (

          gid serial NOT NULL, strshapeid smallint, strid smallint, strtypid smallint, strspuren smallint, strebene smallint, strname character varying(50), the_geom geometry, x1 numeric, y1 numeric, x2 numeric, y2 numeric, source bigint, target bigint, length numeric, edge_id integer, CONSTRAINT frida_pkey PRIMARY KEY (gid), CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2), CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTILINESTRING'::text OR the_geom IS NULL), CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326)

          ) WITHOUT OIDS; ALTER TABLE frida OWNER TO postgres;


          in mapserver i can see the geometry from this data, but i can´t see the routes, if i use the shortest_path_astar2_as_geometry_internal_id() function. thanks...lucky

          • Message #538

            OK.

            Can you try to execute the query with command line? I can't guess which error do you have exactly.

            And I also would suggest you to use newer version of pgRouting.

            • Message #539

              if i execute the query in command line i don´t get an error, i have no results! but with the same start/end with other functions i get a perfekt route an i can see also the route via mapserver. what i want is to use your php/mapscipt from routing_os_frida.phtml. in this script you use the shortest_path_astar2_as_geometry_internal_id() function, to catch the start/end from the dropdown-list. ok...i will try a newer version. do you have a script like routing_os_frida.phtml where i catch start/end points from a list?

              thanks a lot...lucky

              • Message #540

                Now I understand a little bit better. I was wondering where you read about those functions. Are you trying to setup the demo of Kai Behncke and Florian Thuerkow? They made this demo and sent us the link, so we added it to the project page.

                I guess, it hasn't been updated for a longer time and uses an old version of pgRouting. I don't know well about it so I can't help you much here. I can only suggest you to try the tutorial. It's much newer. It shouldn't be too difficult then to use with Frida data then.

                • Message #541

                  ok...i will try it. thanks for you time...lucky