Route from 1 Polyline-Layer#
The route from line layer works in a very similar way to the route from point layer, but instead of using a point layer, it uses a line layer as input. This is particularly useful when you want to calculate routes based on existing paths or roads, rather than just points.
Try it out by creating a quick line layer with a few segments, then using the Directions from 1 Line-Layer
tool.

Fig. 29 The Directions from 1 Line-Layer tool user interface#
Advanced Parameters#
All Directions tools in ORSTools offer advanced parameters to help you fine-tune the routing process. These options include:
Extra Info
Request additional route details, such as road surface, track type, or OpenStreetMap way ID. The route will be split into its segments, and each segment will contain the requested information.CSV Factor and CSV Column
This is an experimental feature that is not available on the live API. The openrouteservice help forum contains more information on how to use that.Features to Avoid
Specify features to avoid during routing, such as certain roads or areas.
Options include:Highways
Tollways
Ferries
Fords
Steps
Note, that not all avoidance features are available for all profiles.
Types of Borders
Choose which types of borders should be considered during routing.
Options:All
Controlled
None
Country IDs to be Avoided
Specify countries to avoid during routing.
See the openrouteservice documentation’s country list for ID’s.Avoid Polygons
Specify polygons to avoid during routing by selecting the appropriate layer.

Fig. 30 The advanced parameters in the Directions from 1 Line-Layer tool#
A route from a Polyline Layer with advanced parameters#
To demonstrate the use of advanced parameters, let’s create a route from a polyline layer with some additional settings. Create a new polyline layer with a few segments that lead from Zadar, Croatia, to Split, Croatia. Or use the example data.
First, we want to see the fastest route from Zadar to Split, so we will set the travel mode to fastest
and the travel
profile to driving-car
.
This time, we want to experience the beautiful Croatian coast, so we will prefer the coastal route over the highway.
Also, tollways will be avoided, as they are too expensive for our budget road trip. We also have a rental car with
limited miles, so we’ll use the shortest
route option to save on our remaining miles. The shortest route is in this
case also the one along the coast, which means a double win for us!

Fig. 31 See the route with the advanced parameters in grees, the fastest route in red.#