Dirt roads instead of highways?

Highways are not always the first choice for a routing. For example when it comes to farming, not all agricultural vehicles are built for highways. They are designed for rugged fields, not for speeding down the highway. While they might be kings of the countryside, these vehicles are better suited for dirt roads.

Since version V1.31.0 of the PTV Developer Routing API you can avoid highways. Therefore the existing request parameter ‘avoid’ is extended by the new value ‘HIGHWAYS’. Please note that the goal is to avoid and not to prohibit the highways. They are only used, if there is no other choice, which is usually not the case.

Also a waypoint located on a highway, for example a field next to a highway, is not matched to the highway and uses the paths along the fields. Together with setting the maximum speed (see this blog post), you have a flexible way to consider a big range of agricultural vehicle in routing.

Just test the new feature with this code sample or get an overview of all available avoid options like toll or ferries in this concept.

To keep yourself updated about releases and news you can use the subscribe button at the top of the page. If you got any question do not hesitate to get in contact.