Shortest route solution
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Fri Jun 3 06:29:01 PDT 2005
This has been discussed in the archives search for "router"
In general, this should not be a mapserver function because, the data
(or organization of the data) required is not what mapserver needs or
vica versa. The best (better?) way to do this is to create a separate
application the computes the route and returns an xml document or a
couple of files with a unique name. Then use mapscript to integrate the
results with a map.
I have done this and have a demo at http://imaptools.com/demos1/?tab=2
The router is C code and creates a filename.shp and filename.txt as
results. the PHP code then takes the shapefile and adds it to a layer
already in the mapfile and the driving directions go into the
filename.txt and they are read and displayed under the make.
The biggest issue is that you need data that is good for routing and in
most cases that means commercial data which is very expensive.
This worked for me, hope it helps you get started.
-Steve W.
Gambin Dejan wrote:
> Hi,
>
> Did anybody implement the shortest route algorithm to mapserver and what
> are the experiences/suggestions? I would like to be able to find a
> shortest route between two points on my MapServer map and highlight it
> somehow. I found a conference document about grass server that should be
> able to do so using php extension on client side (the client can be
> mapserver). Does it exist or is just in future plan?
>
> I would appreciate any suggestions on this field
>
> thanks
>
> dejan
>
More information about the MapServer-users
mailing list