[mapserver-users] network analysis in mapserver
woodbri at swoodbridge.com
woodbri at swoodbridge.com
Mon Jul 15 09:27:04 PDT 2002
On 15 Jul 2002 at 19:05, Roberto Micarelli wrote:
> On Monday 15 July 2002 16:37, woodbri at swoodbridge.com wrote:
> > Seamus,
> >
> > Mapserver doesn't have this functionality as you probably know at
> > this point. I have code that does what you describe below that could
> > be adapted to any number of similar application. To be able to run
> > fast (ie for a web application) I build a directed graph that is then
> > used to compute the shortest path method and then I extract the
> > required segments into a shape file that can be rendered by
> > mapserver.
> >
> > I have a live demo running on my site at
> > http://iMapTools.com/demos
> > click the "Get A Route" link
> >
> > This demo is using the US National Highway Planning Network
> > shapefiles for the directed graph, but a directed graph could be
> > built for other networks from shapefiles or other data sources.
> >
>
> Do you build the graph on each invocation or does it stay resident?
I build it once and reuse it. I takes like 5 minutes to read a 65 MB
shapefile and build a digraph and the same digraph can be reused. I
also generate other structures that I need to extract the shape info
after the shortest path is done.
> Did you
> write the code for digraph support?
Yes, I wrote this code myself and then modified an existing shortest
path algorithm to use my digraph and also the code to post process
the shortest path results to extract and generate the resultant shape
file.
-Steve
More information about the MapServer-users
mailing list