Having followed Bills advice last year I tried to do this - it does work but its not very quick. Admittedly I was also trying to generate a link/node network on the fly in order to extend the way the 'trace' tool works, so there was an extra overhead, but generally speaking MapBasic isn't very speedy at this sort of calculation. I was trying to trace across a map screen while digitising rather than just within an existing map object. On a small network it may not matter that you are using MB but don't ask me to define 'small'.
The algorithm itself is simple but the generation of a the network with all the connectivity, even in a small area, was pretty slow. If you have a non-dynamic link/node network that you can represent outside MapInfo (eg in a database table - any better suggestions?), and you can put the calculations into something like C++ you'll get the best results. Then run the algorithim with your start/end points to retrieve your link IDs. To see them on the map select the matching links with a simple SQL statement. Its worth considering that tools such as Routeware and others also include all the groovy stuff eg turn restrictions which you can build but which take a fair bit of time to do well. It may be cheaper for your organisation if you buy something rather than spend a few weeks writing it. Paul Crisp Syntegra Innovation Place Delta Bank Road Newcastle NE11 9DJ Tel 0191 461 4522 Fax 0191 460 1987 -----Original Message----- From: B. Thoen [mailto:[EMAIL PROTECTED] Sent: 12 December 2003 00:14 To: MapInfo-L Subject: RE: MI-L Help! Route Tracing On Fri, 12 Dec 2003, Simmonds, Ashley (PTB) wrote: > see if http://www.routeware.dk/ helps any with this. Uffe Kousgaard is a > regular here on MI-L and should be able to tell you whether it'll do what > you want. I'll second that. Routeware is a pretty good package. It might be a little more than you want to spend, but it does a lot and works great in MapInfo. However, if you can use MapBasic, you can try doing it yourself. I wrote a simple "shortest path" program that uses Dijkstra's algorithm in MapBasic a couple of years ago, and it worked fine. The paper I used is no longer at the URL where I found it, but google for "dijkstra's algorithm" and you'll have about 17,000 choices. Sometimes buying a tool is cheaper than doing it yourself, and after realizing what's involved, buying routeware was the better choice for me (but the problem I needed to solve was quite a bit more complicated than yours.) - Bill Thoen --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 9542 ******************************************************************** This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you Check us out at http://www.syntegra.com ********************************************************************
