TomTom Speed Profiles enables the best route calculations based on unique speed patterns per individual road segments, helping drivers and fleet managers better plan ahead. These profiles are easily integrated into on-board and online routing algorithms for navigation and geospatial applications as well as built-in vehicle navigation.
We measure typical speed values in five-minute intervals across time of day and day of week, on every road segment and for every direction of traffic. Delays and free flow are incorporated in the travel time, allowing for the most accurate estimated times of arrival (ETAs).
TomTom Speed Profiles provides coverage of highways and secondary roads in more than 80 countries, using inputs from 600+ million connected devices worldwide. You can easily and quickly deploy the product to multiple markets.
TomTom Speed Profiles comes in three different formats for ease of integration for any use case. Choose compact data optimized for a small footprint, a full dataset for an online environment or as a map-agnostic, OpenLR-based full version. TomTom Speed Profiles can be integrated into our TomTom Map Multinet and Multinet-R, and is also available for the Navigation Data Standard (NDS).
With the GraphHopper Directions API you can integrate A-to-B route planning, turn-by-turn navigation,route optimization, isochrone calculations, location clustering and other tools in your application.
You should utilize the SSL session to speed up responses after the initial response or use a library that does this. E.g. for Java the OkHttp library automatically reuses SSL/TLS sessions and also the browser takes care of this automatically.For python you can use the requests library: first you create a session (session = requests.Session()) and then do requests only with this session instead of directly using "requests".
If you create your own client, make sure it supports http/2 and gzipped responses for best speed.If you use the Matrix, the Route Optimization API or the Cluster API and want to solve large problems, we recommend you to reduce bandwidthby compressing your POST request and specifying the header as follows: Content-Encoding: gzip. This will also avoid the HTTP 413 error "Request Entity Too Large".
OpenStreetMap covers the whole world. If you want to see for yourself if we can provide data suitable for your region,please visit GraphHopper Maps.You can edit and modify OpenStreetMap data if you find that important information is missing, e.g. a weight limit for a bridge.Here is a beginner's guide that shows how to add data. If you have edited data, we usually consider your data after 1 week at the latest.
You can also adjust the speeds, access options and much more by using customized routing profiles. We offer this for the Routing API (see the section about Custom Models). For interested customers we offer the Profiles API that can be used for matrix calculations and route optimiztion as well.
If you want to include traffic, you can purchase the TomTom Add-on.This Add-on only uses TomTom's road network and historical traffic information.Live traffic is not yet considered. If you are interested to learn how we consider traffic information, we recommend that you read this article.
A custom model allows you to modify the default routing behavior of a vehicle profile by specifying a set of rules in JSON language.There are three JSON properties to change a profile: priority, speed and distance_influence that are described in great detail in the next sections and you can get a quick overview in this example-driven blog post.
As you might have already guessed this limits the speed on motorways to 90km/h.Changing the speed will of course change the travel time, but at the same time this makes other road classes more likely as well, so you can use this model to avoid motorways.
You can immediately try this out in the Browser on GraphHopper Maps.GraphHopper Maps offers an interactive text editor to comfortably enter custom models.You can open it by pressing the "custom" button. It will check the syntax of your custom model and mark errors in red. You can pressCtrl+Space or Alt+Enter to retrieve auto-complete suggestions. Pressing Ctrl+Enter will send a routing request for thecustom model you entered. To disable the custom model you click the "custom" button again.
There is a fourth JSON property areas that allows you to define areas that can then be used in the if or else_if conditions for speed and priority.Please read more about this and the other properties below and try some examples inGraphHopper Maps with the help ofthis blog post.
When using custom models you do not need to define rules that specify a speed for every road segment, but rather GraphHopperassumes a default speed. All you need to do is adjust this default speed to your use-case as you will always use the custom model in conjunction with a routing profile which is used to determine the default speed.
The custom model is a JSON object and the first property we will learn about here is the speed property. The speedproperty's value is a list of conditional statements that modify the default speed. Every such statement consists of acondition and an operation. The different statements are applied to the default speed from top to bottom, i.e.statements that come later in the list are applied to the resulting value of previous operations. Each statement is onlyexecuted if the corresponding condition applies for the current road segment. This will become more clear in the followingexamples.
This custom model reduces the speed of every road segment for which the road_class attribute is MOTORWAY tofifty percent of the default speed (the default speed is multiplied by 0.5). Again, the default speed is the speedthat GraphHopper would normally use for the profile's vehicle. Note the if clause which means that the operation(multiply_by) is only applied if the condition road_class == MOTORWAY is fulfilled for the road segment underconsideration. The == indicates equality, i.e. the condition reads "the road_class equals MOTORWAY". If you're a bitfamiliar with programming note that the condition (the value of the if key) is just a boolean condition in Javalanguage (other programming languages like C or JavaScript are very similar in this regard). A more complex conditioncould look like this: road_class == PRIMARY road_class == TERTIARY which uses the or() operator and literally means "road_class equals PRIMARY or road_class equals TERTIARY".
In this example the default speed of road segments with road_class == MOTORWAY will be multiplied by 0.5, the default speedof road segments with road_class == PRIMARY will be multiplied by 0.7 and for road segments with both road_class == MOTORWAY androad_environment == TUNNEL the default speed will be multiplied first by 0.5 and then by 0.7. So overall thedefault speed will be multiplied by 0.35. For road segments with road_class == PRIMARY and road_environment == TUNNEL weonly multiply by 0.7, even though both parts of the second condition apply. It only matters whether the road segment matchesthe condition or not.
This implies that on all road segments with the GRAVEL value for surface the speed will be at most 60km/h,regardless of the default speed and the previous rules. So for a road segment with road_class == MOTORWAY,surface == GRAVEL and default speed 100 the first statement reduces the speed from 100 to 80 and the secondstatement further reduces the speed from 80 to 60. If the road_class was PRIMARY and the default speed was 50the first rule would not apply and the second rule would do nothing, because limiting 50 to 60 still yields 50.
In case you want to distinguish more than two cases (road segments that match or match not a condition) you can use else_ifstatements which are only evaluated in case the previous if or else_if statement did not match:
You can not only modify the speed of road segments based on properties, like we saw in the previous examples, but youcan also modify the speed of road segments based on their location. To do this you need to first create and add someareas to the areas section of the custom model. You can then use the name of these areas in the conditions of yourif/else/else_if statements.
Areas are given in GeoJson format (FeatureCollection). Currently a member of this collection must be a Feature with ageometry type Polygon. Note that the coordinates array of Polygon is an array of arrays thateach must describe a closed ring, i.e. the first point must be equal to the last, identical to the GeoJSON specs.Each point is given as an array [longitude, latitude], so the coordinates array has three dimensions total.
Make sure you read the introductory section of this document to learn what the priority factor means. In short itallows similar modifications as speed, but instead of modifying the road segment weights and travel times it will onlyaffect the weights. By default, the priority is 1 for every road segment, so it does not affect the weight. However,changing the priority of a road can yield a relative weight difference in comparison to other roads.
Customizing the priority works very much like changing the speed, so in case you did not read the section aboutspeed you should go back there and read it now. The only real difference is that there is no limit_to operator forpriority. As a quick reminder here is an example for priority:
Edges with lower priority values will be less likely part of the optimal route calculated by GraphHopper, higher valuesmean that these road segments shall be preferred. If you do not want to state which road segments shall be avoided, butrather which ones shall be preferred, you need to decrease the priority of others:
which means that the priority for all road segments that allow a maximum vehicle width of 2.5m, a maximum vehiclelength of 10m or a maximum vehicle weight of 3.5tons, or less, is zero, i.e. these "narrow" road segments areblocked.
e59dfda104