[pgrouting-users] Question about driving_distance calculation

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jan 11 13:45:43 EST 2011


On 1/11/2011 11:34 AM, Markus Innerebner wrote:
> Hello Daniel
>
> thanks for your detailed answers.
>>
>> Driving Distance functions starts with a vertex. (There is a wrapper
>> function that takes coordinates as start and searches for the nearest
>> vertex
>> from the given point).
>>
>>
>>
>>> 2) what happens with edges, that are partially reached? (one vertex is
>>> reached in time, the other one is not)
>>>
>>
>> Driving Distance only cares about vertices, because it works like
>> Dijkstra
>> algorithm. You can take the vertices and write an SQL function for
>> example,
>> that returns you the edges ... or a polygon.
> ok, thanks
>
> The algorithm uses only the cost column(or reverse_cost column) of the
> edges to compute the costs of the target vertex? This means there is no
> way to compute the cost in dependency of a passed walking speed
> parameter, where cost are defined as edge_length/speed.

You might be able to define a view where you add a column walking_speed 
and compute the value you want.

Then pass the view to the wrapper along with your new column name.

Also I would recommend reading the plpgsql of the wrapper function. It 
should be pretty easy to clone it and modify it to meet you needs. I 
have done this for some of my projects.

-Steve W


More information about the Pgrouting-users mailing list