Prepare routing table for Shooting-Star

Add x1, y1 and x2, y2 column

ALTER TABLE victoria ADD COLUMN reverse_cost double precision;
UPDATE victoria SET reverse_cost = length;
ALTER TABLE victoria ADD COLUMN to_cost double precision;
ALTER TABLE victoria ADD COLUMN rule text;

Run Shortest Path Shooting-Star query

shortest_path_shooting_star( sql text, 
		   source_id integer, 
		   target_id integer, 
		   directed boolean, 
		   has_reverse_cost boolean ) 

(Source and target IDs are edge IDs.)

Shooting-Star core function

SELECT * FROM shortest_path_shooting_star('
		SELECT gid as id, 
			 length::double precision as cost, 
			 x1, y1, x2, y2,
			 rule, to_cost 
			FROM victoria', 
		36339, 22921, false, false); 

Wrapper function with bounding box

SELECT gid, AsText(the_geom) AS the_geom
	FROM shootingstar_sp('victoria', 36339, 22921, 5000,