Hi guys :) -- a *special* wink to David Techer ;-)

I'm having a bit of trouble figuring out what can I do with the wrapper functions of pgRouting... (blush)

The thing is:

I have everything perfectly in place, pgRouting working as it's supposed to, but!

I have a dataset that describes the road type. I want to filter the results provided by pgRouting in a way that it *doesn't* return return pedestrian segments (btw: road_type=22).

So, as to the query itself (basic) 1st try:

SELECT gid, AsBinary(the_geom) AS the_geom
   FROM dijkstra_sp_directed('pt_madeira_roads', 11780, 424, true, true);

Works like a charm except that it returns pedestrian segments (of course).

2nd try:

SELECT rt.gid, AsText(rt.the_geom) AS wkt,
                  length(rt.the_geom) AS length, roads.gid
               FROM my_roads as roads,
                   (SELECT gid, the_geom
                       FROM dijkstra_sp_directed(
                           'my_roads',
                           11780,
                           424,
                           true,true)
                    ) as rt
               WHERE roads.road_type<>22 and roads.gid=rt.gid;

Leaves me with *holes* in the route.

All of this is, of course, a consequence of my own stupidity and late hours but I'd surely appreciate if some brave soul could look into it. ;-)

Already thankful in advance,
Pedro Doria Meunier.


_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to