[postgis-users] Nearest Aid station to accident
Matthew Pulis
mpulis at gmail.com
Thu Apr 24 00:53:18 PDT 2008
Hi,
I am trying to make a query where is given the nearest aid station (hospital
/ fire station - either which passed through a parameter). Nearest being on
the road network itself, thus I am using pgRouting's function :
Shooting_star.
My idea to tackle the problem is :
- Make an expansion of the accident of 20 KM
- Check which hospital / fire station is within that expansion
- Find the shortest distance between every hospital / fire station
to the accident location
- Prepare the route for the shortest distance
What I am finding hard to implement is the part where to find the shortest
distance on the road network. It is taking more or a less a minute there.
Any idea how I can improve it please?
This is my code : http://yancho.pastebin.com/f75683d8b - The section I am
worried about is : 72 - 96 (highlighted in yellow)
Any idea is extremely appreciated.
Regards
Matthew
_____
I am using the free version of SPAMfighter for private users.
It has removed 27617 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter <http://www.spamfighter.com/len> for free now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080424/1c52fbae/attachment.html>
More information about the postgis-users
mailing list