[pgrouting-users] closest facility with pgrouting
Peer Krueger
peer.krueger76 at gmail.com
Fri Jan 16 03:09:46 PST 2015
thanks Stephen,
I will give it a try ;)
2015-01-14 14:41 GMT+01:00 Stephen Woodbridge <woodbri at swoodbridge.com>:
> On 1/14/2015 5:36 AM, Peer Krueger wrote:
>
>> Dear pgrouting-users,
>>
>> I am looking for users who already made some experience with
>> closest-facility-functions in pgrouting.
>> I want to use this funcionality but even if a function "drivingdistance"
>> exists there does not seem to be a closest facility-function implemented
>> yet.
>> Perhaps kdykstra would be a starting-point to build such a function.
>> Has anyone yet tried to implement this before or can give me some hints
>> where to start?
>> best whishes,
>> Peer
>>
>
> Peer,
>
> I would do something like:
>
> select * from kdijkstraCost('select * from edges', source, targets[],
> directed, has_rcost) where cost>0 order by cost asc limit 1;
>
> id1 - will be the start node
> id2 - will be the destination node
> cost - will be the cost from id1 to id2
>
> Make source your current location, and targets[] is an array of facilities
> to consider.
>
> -Steve
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20150116/8d973b3f/attachment.html>
More information about the Pgrouting-users
mailing list