Top  Next

RW Net 2.44


This documentation is best read by first stepping through most chapters in the User Manual section. The last chapters are not as important as the first, so you can skip them in the first phase (advanced topics).


The Reference Manual section contains an alphabetical list of all functions.


A good way to learn the many functions is to try RW Net Demo, which has been installed. Go to Start > Programs > RW Net > RW Net Demo Application and try it. The source code for this application is also included with RW Net (see Delphi demos).


This document is available as a PDF file from the website for easier printing and reading off-line.




RW Net is a general purpose routing library. It is flexible enough to be used together with almost any GIS system available and it will also work together with most programming tools on the market.


RW Net uses it's own format for storing street networks and included are functions for importing street databases from most common GIS formats. This topological format is targeted towards routing purposes and is described here. RW Net always loads the topological network into memory before doing any calculations.


The basic structure in the topological network is a one-to-one relationship, where the first link in the network matches the first record in your GIS file, second link matches second record etc. This makes the network files very compact and fast to use.


All attribute information (road class, one-way information etc.) is held in a separate data structure which can easily be changed without having to re-create the topological network. The 4 available modes can be used for defining streets which are impassable to heavy vehicles, temporarily closed roads etc.


Using RW Net classes


RW Net consists of 2 main objects: RWnetBase and RWcalc, where RWnetBase holds all network information and RWcalc does the actual calculations. RWnetBase can be used on it's own for a few tasks, but RWcalc will always have to be linked to an instance of RWnetBase. Use function SetNet for linking them.


Several RWcalc can be linked to the same RWnetBase in a multi-threaded application.


The DLL version is slightly different in this area.


Standard functions


This is a short description of some of the main function groups:


Route is used for calculating the cheapest route between two locations. Cheapest can be either shortest, fastest or any combination hereof and besides this you can also have an extra variable calculated along the same route. This can e.g. be used for calculating the distance along the fastest route. It is also possible to do exact routing from somewhere on one street section to somewhere on another street section - we call that dynamic segmentation (RouteDyn).


IsoCost is used for calculating link-based isochrones, but it's also very handy for creating distance matrices in a very efficient manner. IsoCostDyn is useful for the same purposes, just with dynamic segmentation.


TSP2 and TSP2dyn is used for optimizing the sequence of visiting a list of customers.


The Coordinate2Node and Coordinate2Location functions transform a set of coordinates into either a node ID or a location.


Turn restrictions are supported in several ways.


The ExternID functions makes it possible to use a secondary ID for all link references.


Routes can be restricted to streets, that are wide enough, bridges high enough etc. This is done by setting a limit.


RouteList makes it possible to create driving directions and many other more complex results with just a few function calls.


RW Net Pro


See a list of additional functions.




RW Net has several ways of returning results to your application:


As a direct result from a function as when "Route" returns the cost of the cheapest route.

Functions which has a more complex output (e.g. RouteFind or IsoCost), can be queried section by section

As a GIS file (MIF, SHP, TAB, GML 2.1.2 or KML 2.0), which can be imported into your GIS afterwards.




RW Net is being updated all the time with bugs being corrected and new functions added. You can at any time click here to see the latest changes directly from the website. The list of changes is also your key to checking out, if you need to update your current code, when new versions are released. New versions of RW Net are generally backwards compatible, but there are a few exceptions.