[pgrouting-users] [PGROUTING] - Problem when call shortest_path_shooting_star on MAC OS X 10.5.7

Caio Marques caiena.caio.marques at gmail.com
Tue Jun 9 14:58:15 EDT 2009


Hi everybody!

First i like to congratulations to PgRouting team project. It is a  
very usefull project! :)

I have some problems with shortest_path_shooting_star(text, int4,  
int4, bool, bool) function.

I will explain the platform first:

1. Mac OS X 10.5.7
2. PgRouting 1.0.3-2 ( package for MAC OS from kyngchaos )
3. PostGres 8.3.6
4. PostGIS 1.3.5
5. GEOS 10.0.3
6. Proj4 4.6.1
7. GAUL 0.1849
8. CGAL 3.3.1
9. Boost 1.39.0

Now, the procedure:

1. I'm using data from http://www.davidgis.fr/download/pgrouting_wr.sql
2. Run: SELECT gid as id, source, target, cost, reverse_cost,x1,  
y1,x2, y2, rule, to_cost FROM wr  (works fine)
3. Run: SELECT * FROM shootingstar_sp('wr', 20, 8, 0.1, 'cost', false,  
false); (Return an error)

4. I investigate the log file from Postgres and i found this:

LOG:  server process (PID 17895) was terminated by signal 10: Bus error
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted; last known up at 2009-06-09  
15:39:28 BRT
LOG:  database system was not properly shut down; automatic recovery  
in progress
LOG:  record with zero length at 1F/19CD0888
LOG:  redo is not required
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

5. I investigate the source code from shootingstar_sp and i discovered  
this error occurs on this part:

	query := 'SELECT gid,the_geom FROM ' ||
           'shortest_path_shooting_star(''SELECT gid as id,  
source::integer, ' ||
           'target::integer, '||cost_column||'::double precision as  
cost, ' ||
           'x1::double precision, y1::double precision, x2::double ' ||
           'precision, y2::double precision, rule::varchar, ' ||
	  'to_cost::double precision ';
	
	IF rc THEN query := query || ' , reverse_cost ';
	END IF;
	
	query := query || 'FROM ' || quote_ident(geom_table) || ' where  
setSRID(''''BOX3D('||
           ll_x-delta||' '||ll_y-delta||','||ur_x+delta||' '||
           ur_y+delta||')''''::BOX3D, ' || srid || ') && the_geom'', '  
||
           quote_literal(sourceid) || ' , ' ||
           quote_literal(targetid) || ' , '''||text(dir)||''', '''|| 
text(rc)||''' ),' ||
           quote_ident(geom_table) || ' where edge_id = gid ';
	
	FOR path_result IN EXECUTE query
         LOOP
                  geom.gid      := path_result.gid;
                  geom.the_geom := path_result.the_geom;
		 id := id+1;
		 geom.id       := id;

                  RETURN NEXT geom;

         END LOOP;

Anybody knows this problem ?

If you need more details, please contact me.

Regards!
Caio Marques
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20090609/8b9749e0/attachment.html


More information about the Pgrouting-users mailing list