shootingstar (#18) - Missing Start and End Edge in Smart Shooting* Wrapper (#274) - Message List

Missing Start and End Edge in Smart Shooting* Wrapper

I am Using shootingstar_sp_smart from the the latest "routing_core_smart.sql".

As suggested many times in discussions this wrapper function is supposed to trim the start/end edges according to actual start and end point. But instead it just removes start and end edges from the result. please help.

  • Message #966

    Did you create the entry in the "network_info" table?
    It might remove the start and end edge at first, but then should add the required substring again. Could you post a view more details of your query?

    • Message #1401

      I am having the same issue with pgRouting-1.03 and the latest routing_core_smart.sql (revision 331), so here are some details.

      I've created my database using some OSM data and the osm2pgrouting tool. Everything is running smoothly. Here is the query I'm using to calculate the route:

      SELECT rt.gid, AsText(rt.the_geom) AS wkt,
             length(rt.the_geom) AS length, ways.gid
                        FROM ways,
                            (SELECT gid, the_geom
                                FROM shootingstar_sp_smart(
                                    'ways',
                                    2826358.6922535,
                                    5254835.892542,
                                    2826697.2712855,
                                    5254860.6666175,
                                    3000, 'length', false, false)
                             ) as rt
                        WHERE ways.gid=rt.gid;
      

      And here is an image showing the calculated path:

      http://img690.imageshack.us/img690/3817/shootingstarsmart.png

      I've added the network_info entry for the "ways" table using the add_network_info function. My network_info table looks like this:

       select * from network_info;
       tname | max_gid | max_vertex_id | longest_link_length | link_num
      -------+---------+---------------+---------------------+----------
       ways  |   99739 |         52483 |    110591.666611834 |    74220
      (1 row)
      

      I'm running postgresql 8.4.2 with postgis 1.4.0 on Ubuntu 9.10.

      Any ideas what might be causing these results?

      • Message #1417

        Looking at it a few days later I found where the problem was. Since I am totally new to spacial databases and postgis, I was using the queries from the workshop. So I just modified the sample query for the shooting star example to fit the syntax of the shootingstar_sp_smart function.

        But the "join" in the sample query above has the effect of filtering out the trimmed start/end segments, because they are assigned a new gid by the shootingstar_sp_smart function (...and of course they are).