Automatically Creating Fastest and Shortest Vector (Polyline) Routes with Ease on QGIS

Routes are becoming increasingly popular nowadays as almost every smartphone is equipped with GPS. With a single click, each person with a phone embedded with GPS is able to pinpoint the location on earth. It’s turning into individual’s daily needs. Map-direction apps are evolving as well. They’re getting more precise, detailed, fast, and offering more complex and demanding tasks. Routes play an important role in such tasks. Smarter and more precise algorithm is being invented to decide which is the fastest route by taking traffic and road capacity into consideration. Or if you don’t mind the traffic, the algorithm also offers the shortest route, used for walking and running.
A QGIS plugin has this feature. It can create fastest or shortest vector (polyline) routes. Harnessing OpenStreetMap as its basemap, OSM Tools is capable to automatically create polyline route by solely registering start and endpoint. It creates either fastest or shortest polyline routes. It also has the capability to either select or avoid certain points of an area, highways, tunnels, fords, paved roads, tollways, ferries, tracks, and unpaved roads.

  1. To install this sophisticated plugin, go to QGIS’ manage and install plugins and search for “OSM Tools”.

    OSM Tools Plugin

  2. I assume you have the knowledge of either adding basemap without any plugins or QuickMapServices or OpenLayers plugin installed. If you have not, refer to here or here or here.
  3. Add any basemaps with observable road/street. I prefer OpenStreetMap since the original OSM Tools engine uses it.
  4. Open plugin menu > OSM Tools.

    OSM Tools Menu

  5. OSM Tools plugin needs API key which can be easily ordered by click “Order Key!”. It will open the browser directly towards https://openrouteservice.org/sign-up/. Follow the signup process. After successfully signing up, your API Key appears under “My Token”. Copy and paste the API Key into OSM Tools window.

    API Key from https://openrouteservice.org

  6. Select routing tab. In driver mode select car and fastest on preference. On start locations, you can choose either from a map or from layer as the starting point. At this time, choose from a map. The same goes for ending point. Click ok.

    OSM Tools Window

  7. A polyline layer of the fastest route will be automatically created. Right click on the layer to reveal information respecting estimated distance and time to drive the car along the route.

    The Attribute of Created Polyline Route

    The Plugin Automatically Explores either the fastest or shortest route.

That’s it. Easy Peasy Japanesey.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *