Hierarchy 
Top Previous Next 
Some street databases has special attributes for the most important streets, the ones being used as part of long routes. This will typically be motorways, but can also be ferries, bridges and some minor streets which are required to have a connected network.
The advantages of restricting routes to these more important streets are:
•Much faster point2point route calculations for long routes (TRouteCalc). •Simpler routes, which doesn't make shortcuts via minor roads to make a long route a little shorter / faster.
The map below shows an example from TomTom Multinet data with 5 layers of importance (hierarchies):
RW Net 4 uses a method where the calculation of the route is restricted to level 1..X as soon as level X has been reached on the route unless you are within a certain distance Y of the final target. Then additional levels are included in the search again.
For the algorithm to work properly the parameter Y has to be supplied for levels 2 to 5. Level 1 (the top level) is of course always included in the search. The best values for these parameters depend on the geometric properties of the network and how the hierarchy attribute has been setup.
If you have less than 5 levels in your data source  3 for instance  use levels 1, 2 and 3.
If you choose small parameters values, a smaller part of the network is considered when you get close to the target and this improves calculation speed. The downside is you risk not finding the target at all (!), because there are no major streets within the limits you have defined. The solution to this problem is to recalculate without the hierarchy setting or just use a more relaxed setting (larger parameter values). Such recalculations are costly and when choosing parameters it is important to find a balance between normal, fast calculations and the slow recalculations.
Functions for working with hierarchies:
