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
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
thanks Stephen,
I will give it a try ![:wink: :wink:](/images/emoji/twitter/wink.png?v=12)
···
2015-01-14 14:41 GMT+01:00 Stephen Woodbridge <woodbri@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users