CartoType's standard routing system is sometimes not usable for large areas such as Germany on Android and iOS, because the whole route network is loaded into memory, and these mobile devices may not have enough RAM. Use /route=tech to solve the problem.

The tech routing system system makes use of contraction hierarchies.

The abbreviation tech stands for 'turn-expanded contraction hierarchy'. The first part, 'turn-expanded', means that the route network is based on turns rather than route segments, and can therefore incorporate turn costs including cross-traffic turns and delays at lights. The second part, 'contraction hierarchy', means that the network is contracted and simplified by creating large numbers of shortcuts, enabling the correct route to be found after visiting a very small number of nodes.

The new system is not an approximation or a heuristic, or in any way an imperfect solution. It creates exactly the same routes as the standard system. Its main disadvantage is that it doesn't support arbitrary routing profiles at run-time, because the shortcuts have to be worked out in advance during data preparation.

Creating maps with 'tech' routing data

You can create maps with routing tables for the 'tech' system using the makemap command-line option


with makemap.

You can specify one or more built-in routing profiles, which you can select at run-time using the SetBuiltInProfile function from the CartoType framework.


In other words, you can give a list of profiles. Each item in the list is either one of the names 'car', 'walk', 'hike', 'bike', or the name of a .ctprofile file containing the profile. You can create .ctprofile files by exporting them from the Maps App.

By default the car profile is used.

Advantages of /route=tech

It uses much less memory at run-time.

It is much faster than A-star routing over most routes, and there is no delay when creating the first route, because the route network doesn't need to be loaded into memory.

Disadvantages of /route=tech

You can't set arbitrary route profiles at run-time.

The map files are larger. For example, comparing sizes for a map of Sweden:

/route=t (turn-expanded A-star): map size = 950Mb of which 160Mb is the route table.

/route=tech (turn-expanded contraction hierarchy): map size = 1729Mb of which 939Mb is the route table.