• Home
  • About

GIScience News Blog

News of Heidelberg University’s GIScience Research Group.

Feed on
Posts
Comments
« Global analyses are ohsome
GIScience at Kinderuni »

openrouteservice Io

Mar 15th, 2019 by Adam Rousell

openrouteservice Io is here!

The openrouteservice from HeiGIT has just had its latest update, and we want to introduce you to Io (version 5.0). This new version brings something that has been a while in the making and will make things a lot easier when it comes to requesting information from the openrouteservice - a new API (v2) that is based purely on POST requests using JSON objects. Now, rather than encoding all of the information needed for generating a route inside the querystring of a GET request, (almost) all the information is now contained in a nicely formatted and structured JSON body request.
The request information itself remains mostly unchanged, with just some alterations to improve the structure. One of the biggest changes for that is that all pipes are gone (yay!) when it comes to providing multiple values for a parameter - now they are all contained in nice JSON arrays.
All responses follow the same format as the previous API (though for the directions service, geometry in the JSON response format is now restricted to Encoded Polyline - we strongly recommend the use of the GeoJSON format when the size of data transmission is not an issue). This means that if you want to update your own services to use the new API (which we thoroughly encourage), handling of the route that is returned should require minimal alterations, if any are needed at all. You will need to update your request generator, but with the use of nice clean JSON objects, that should be relatively straightforward. And if you do get stuck, we have our forum where you can post questions and we will be happy to lend our eyes and minds to helping you out. If you are not feeling up to moving to the v2 API yet, don’t worry as the old API will stay exactly the same for the next year (though you may miss out on some cool new features that are coming which will only be in the new API).

Examples

Requests to the openrouteservice v2 API use POST requests with the following format:

https://api.openrouteservice.org/v2/{service}/{profile}

For the routing endpoint, you can also add the response format (json, geojson, gpx) to the url:

https://api.openrouteservice.org/v2/directions/{profile}/{response format}

All parameters that are used for the services are passed as the request body in a JSON object.

For a request to the routing service using the old API, you would use something like

https://api.openrouteservice.org/directions?profile=driving-car&coordinates=
49.2315,8.89267|49.47223,8.72366&preference=shortest&extra_info=surface|waytype&format=geojson

With the new API you would send to

https://api.openrouteservice.org/v2/directions/driving-car/geojson

the body request of

{
  "coordinates": [
    [49.2315,8.89267],
    [49.47223,8.72366]
  ],
  "preference": "shortest",
  "extra_info": [
    "surface",
    "waytype"
  ]
}

For a full list of parameters that can be passed, you can look at our interactive documentation where you can also have a play around.

More features

The Io release didn’t just update the API, but also introduced a number of additional features and fixes including (amongst others):

  • Updating Isochrones so that smaller distance isochrones are more accurate

When you generate isochrones for smaller distances, the algorithms have been updated to make them more accurate.

  • Allowed the passing of ISO country codes when choosing to avoid countries

The avoid countries/borders functionality has been available for some time on the openrouteservice, but now we have made it better by allowing you to pass the ISO 2 or 3 digit country code rather than our internal country ID. So now rather than passing …avoid_countries:39|130|2… you can use …avoid_countries:DEU|CHZ|FRA…

  • Inclusion of freehand route segments

Now it is possible to skip segments of a route using the freehand route segments. Using these, you can define waypoints (as normal) and then tell openrouteservice to not generate routes between combinations of these waypoints, which can be of great use when you know your own way between two places and don’t want suggestions. More information about this will be coming soon, so watch this space…

Also, to allow an upcoming enhancement relating to super fast routing whilst still using restrictions, some options have unfortunately had to be removed from the API. These include some avoid_features (pavedroads, unpavedroads, tunnels, tracks, and hills) as well as the maximum_speed, fitness_level and maximum_steepness (for cycling and walking profiles).

Io

Io is the closest of Jupiter’s so called 4 “Galilean Moons” which got their names as they were first viewed by a human when Galileo pointed his telescope to the bright dot in the night sky that was Jupiter. It is the most geologically active body in the solar system which is due to the constant squeezing inflicted on it by Jupiter and the other Galilean Moons which heats up its interior to cause volcanic eruptions up to 500km high (The International Space Station orbits Earth 408km above the Earth’s surface…).

Tags: API, heigit, Io, openrouteservice, OSM, routing

Posted in Services

Comments are closed.

  • About

    GIScience News Blog
    News of Heidelberg University’s GIScience Research Group.
    There are 1,679 Posts and 0 Comments so far.

  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Recent Posts

    • High Resolution Data Insights from OpenStreetMap Element Vectorisation
    • Data publication: Point clouds of snow-on and snow-off forest site
    • Job Offer: Deep Learning Engineer (m/f/d, up to 100%)
    • GIScience Postdoc/Senior Researcher Opportunity for OpenStreetMap Road Quality Analysis
    • Assessing road criticality and loss of healthcare accessibility during floods: the case of Cyclone Idai, Mozambique 2019
  • Tags

    3D 3DGEO Big Spatial Data CAP4Access Citizen Science Conference crisis mapping Crowdsourcing data quality deep learning disaster DisasterMapping GeoNet.MRN GIScience heigit HOT humanitarian humanitarian mapping Humanitarian OpenStreetMap team intrinsic quality analysis landuse laser scanning Lidar machine-learning Mapathon MapSwipe MissingMaps Missing Maps ohsome ohsome example Open data openrouteservice OpenStreetMap OSM OSM History Analytics Public Health Quality quality analysis remote sensing routing social media spatial analysis Teaching VGI Workshop
  • Archives

    • February 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • April 2013
  •  

    March 2019
    M T W T F S S
    « Feb   Apr »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Recent Comments

    GIScience News Blog CC by-nc-sa Some Rights Reserved.

    Free WordPress Themes | Fresh WordPress Themes