Digital Geography

12. May 2017

Short Announcement: New OSM routing plugin for QGIS OSM Tools

Two years ago I wrote the OSMroute plugin which enable the QGIS user to use the OpenRouteService API for geocoding of points, accessibility analysis as well as routing from A to B. Unfortunately the managing of a plugin/ open source tool is time-consuming/ hard. But fortunately Nils Rode lifted the plugin to a new level: OSM tools.

OSM Tools Plugin

The plugin can be installed as a normal plugin via the plugin manager:

OSM tools plugin in QGIS plugin manager

The usage is quite easy and enable you to geocode/reverse geocode addresses, find routes, create an isochrone map. Yet as the API from openrouteservice.org is an open one there are some limitations on the API:
  • 500 free requests per day in total
  • 40 requests per minute

OSM tools interface

You could be easily affected by these restrictions as the API allows some batch jobs. The batch mode enables you row-by-row or row-by-any routing.

different types of batch modes.

The result is really good: a clean feature table with all the needed information of the routes:

OSM Tools Batch mode result

Nils did a great job on this one and I encourage everyone to use this with your own API key, look for issues with it (and report them!) and help this plugin to grow!
  • Ian Kirk-Ellis

    Are there any plans to enable this to work in the UK. I saw this and added it to my copy of QGIS as it would be a fantastic addition, but when I tried it, it wouldn’t work

  • GISACKA

    Thank you for intrucing this very useful tool.
    When trying the tab accessibility areas, I always get an error with the conduction in the python script. Does anyone has an idea how to solve it? Thanks in advance.

    2017-05-22T10:07:28 1 Traceback (most recent call last):

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools.py”, line 234, in run

    self.route_anal.route()

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools_routing.py”, line 250, in route

    point_list = [float(x) for x in end_features[0].split(“,”)]

    ValueError: could not convert string to float: Long

    2017-05-22T10:08:06 1 Traceback (most recent call last):

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools.py”, line 231, in run

    self.access_anal.iterAnalysis()

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools_access.py”, line 286, in iterAnalysis

    feat_list, isochrone_list = self.accRequest(feat_in.geometry())

    TypeError: ‘NoneType’ object is not iterable

    2017-05-22T10:21:41 1 Traceback (most recent call last):

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools.py”, line 231, in run

    self.access_anal.iterAnalysis()

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools_access.py”, line 286, in iterAnalysis

    feat_list, isochrone_list = self.accRequest(feat_in.geometry())

    TypeError: ‘NoneType’ object is not iterable

    2017-05-22T10:22:22 1 Traceback (most recent call last):

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools.py”, line 231, in run

    self.access_anal.iterAnalysis()

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools_access.py”, line 286, in iterAnalysis

    feat_list, isochrone_list = self.accRequest(feat_in.geometry())

    TypeError: ‘NoneType’ object is not iterable

    2017-05-22T10:23:36 1 Traceback (most recent call last):

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools.py”, line 231, in run

    self.access_anal.iterAnalysis()

    File “C:/Users/User/.qgis2/python/pluginsOSMtoolsosm_tools_access.py”, line 286, in iterAnalysis

    feat_list, isochrone_list = self.accRequest(feat_in.geometry())

    TypeError: ‘NoneType’ object is not iterable

    • Nils

      Hi Gisacka,

      as Riccardo wrote, please post issues here:
      https://github.com/nilsnolde/ORStools/issues

      Please include the URL used (w/o key). You can get it via the Python console in QGIS, it´ll print the URL when making a request.