shootingstar (#18) - shootingstar_sp_smart problem (#400) - Message List
Hi,
I'am using shootingstar_sp_smart to do routing from coordinate to coordinate. For some routes i get a correct result but for other i get this error:
ERROR: query string argument of EXECUTE is null CONTEXT: PL/pgSQL function "shootingstar_sp_smart" line 358 at FOR over EXECUTE statement PL/pgSQL function "shootingstar_sp_smart" line 5 at FOR over EXECUTE statement
Any idea what is wrong here ?
Sebastiaan
-
Message #1752
It seems that it would be a problem with the srid. Is your table registered in the geometry table?
flivingstone_the_sec11/11/10 20:43:49 (9 days ago)-
Message #1754
I gues that should be ok some routingings are ok on the samen network, i've put a screenshot here
http://www.onderweg.nl/images/pgrouting.png
The red line show a calculated route between the points with a brown color. (The pink points are from the temp_vertices table). The route calculation give the error if i try to calculate the route between the brown point which are indicated by the blue arrows.
sebastiaan11/11/10 22:24:10 (9 days ago)-
Message #1755
I must admit I don't really know what's going wrong. Can you upload the description of the segments between the points you are trying to connect?
flivingstone_the_sec11/12/10 02:49:36 (8 days ago)-
Message #1756
Hi,
Ive put a backup of the database here [ http://www.onderweg.nl/images/testdb.zip]
So e.g. the first query runs ok, but the second one doesn't.
SELECT gid ,the_geom FROM shootingstar_sp_smart('wegvakkenwgs84',5.1698,52.3023,5.15377,52.3062, 0.00001,'to_cost',false, false);
SELECT gid, the_geom FROM shootingstar_sp_smart('wegvakkenwgs84',5.14487,52.306,5.13097,52.3065, 0.00001,'to_cost',false, false);
sebastiaan11/12/10 19:20:59 (8 days ago)-
Message #1758
Hi, I had very few time left those last days. I quickly check into the function. You can help yourself by raising notices. Like RAISE NOTICE as shown below.... The problem seems to be that when the extra edges are created, the cost or some other field are not populated properly. In order to check that, I added Notices in this part of the code :
-- Newly created edges should be appended here FOR i IN 1..6 LOOP --curr := extra_edges[i]; RAISE NOTICE 'i=%', i; IF extra_edges.rule[i] IS NULL THEN extra_edges.rule[i]:='NULL'; ELSE extra_edges.rule[i]:=''''''||extra_edges.rule[i]||''''''; END IF; IF extra_edges.to_cost[i] IS NULL THEN extra_edges.to_cost[i]:=0; END IF; --FA : the raise notice example RAISE NOTICE 'gid %',extra_edges.gid[i]; RAISE NOTICE 'source %',extra_edges.source[i]; RAISE NOTICE 'target %',extra_edges.target[i]; RAISE NOTICE 'cost %',extra_edges.length[i]; RAISE NOTICE 'rule %',extra_edges.rule[i]; RAISE NOTICE 'to cost %',extra_edges.to_cost[i];
So when you try to concatenate a value that is null to the variable query, it screws the things up and the query take a NULL value. You may want to check in this direction. Basically, what the wrapper does is finding the closest segments to your points, split them into extra_edges, and pass the pieces of information to those extra edges. Something goes wrong in this process. I checked in the query that doesn't work, the source and destination segment are found. It is when passing the information that things get messed up.
I hope it helps! Cheers
flivingstone
flivingstone_the_sec11/16/10 12:41:18 (4 days ago)
-
-
-
-