Important
Only valid for pgRouting v1.x. For pgRouting v2.0 or higher see http://docs.pgrouting.org
The driving_distance function has the following signature:
CREATE OR REPLACE FUNCTION driving_distance(
sql text,
source_id integer,
distance float8,
directed boolean,
has_reverse_cost boolean)
RETURNS SETOF path_result
sql: a SQL query, which should return a set of rows with the following columns:
source_id: int4 id of the start point distance: float8 value of distance in degrees
distance: float8 value in edge cost units (not in projection units - they might be different).
directed: true if the graph is directed
has_reverse_cost: if true, the reverse_cost column of the SQL generated set of rows will be used for the cost of the traversal of the edge in the opposite direction.
The function returns a set of rows. There is one row for each crossed edge, and an additional one containing the terminal vertex. The columns of each row are:
SELECT * FROM driving_distance('SELECT gid AS id,source,target,
length::double precision AS cost FROM dourol',10549,0.01,false,false);
vertex_id | edge_id | cost
-----------+---------+---------------
6190 | 120220 | 0.00967666852
6205 | 118671 | 0.00961557335
6225 | 119384 | 0.00965668162
6320 | 119378 | 0.00959826176
...
...
...
15144 | 122612 | 0.00973386526
15285 | 120471 | 0.00912965866
15349 | 122085 | 0.00944814966
15417 | 120471 | 0.00942316736
15483 | 121629 | 0.00972957546
(293 rows)