Overview
Getting started
The best way to start learning how to use RW Net is to try some of the small samples included. With these
you can see how to create the most basic application, that is calculating the distance from one
place to another. This application is available in all the programming environments.
Additional sample code is also included for Delphi, Mapbasic and ArcView.
Once you have got the basic sample code up and running, read this page and have decided what you want to implement,
you may turn to the demo available at routeware website and try
it to see how the more complex functions are implemented. All source code for this application is available as /delphi/demo1.
All reference information can be found in the alphabetically sorted list to the left. There are also included a few documents,
which points out various more complex topics.
Topological network
RW Net creates a topological network, which is a compact representation of the underlying GIS-network.
This holds information about which links are connected to which nodes and further on to other links ("topology").
This is the central part of the network. RW Net always loads the topological network into memory before doing
any calculations.
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 links which are impassable to heavy vehicles, temporarily
closed roads...
Coordinate systems
RW Net supports two kind of coordinate systems: Latitude/longitude and non-earth systems (X-Y). When
dealing with non-earth systems most linear measures are supported (km, miles, meter, ft etc.).
Distances and speed is based upon either km or miles.
Standard functions
RW Net has two main functions called Route and IsoCost:
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.
IsoCost is used for calculating link-based isochrones, but it's also very handy for creating distance matrices in a very
efficient manner.
Advanced functions
RW Net includes functions, which are aimed at analyzing the network:
- Close nodes
- Cul-De-Sac
- Join links
- Parallel links
- Subnet
- UnUsedLinks
These are functions for finding problems in your network and possibly reducing it's complexity.
Output
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. Route or IsoCost), can be queried piece by piece or
- The result can in one step be saved to a mapinfo dat-file or a shape dbf-file. MapInfo and ArcView
doesn't keep files open after they have finished drawing, which makes it possible to write results directly
to the attribute files. These can then be used for thematic mapping.
- As a MapInfo mif/mid file, which can be imported into your GIS afterwards.
All output methods are not available to all functions.
DLL and ActiveX / VCL / CLX version
The various versions are very much the same, except for a few differencies. The DLL version will only
allow one network to be loaded at a time because only 1 instance of the network object is created,
when the DLL is initialized. The DLL has also built-in dialogs for showing progress, when creating/loading the
network.
The other versions are divided into 2 components: TRWnetBase(X) and TRWcalc(X), where TRWnetBase holds all network information
and TRWcalc does the actual calculations. Several TRWcalc can be linked to the same TRWnetBase in a multithreaded application.
The function calls are also the same. However in the DLL version all boolean types are replaced with 16-bit integers,
since not all programming environments support boolean types in a DLL. All functions which include floating point
variables come in two variations: Double and single precision. Single precision interfaces are padded with an A.
An example: Function Route uses double precision, while RouteA uses single precision.
The DLL and Active-X version are password protected (not in the free version). The first call in both versions should be the
init function. If the init function isn't called, RW Net stops immediately without further notice.