Search code examples
openstreetmapgeojson

Is there a way to get more geojson information from OpenRouteService about the road?


I get a direction geojson from point A to point B via OpenRouteService GET API.

The geojson response looks like this:

"properties": {
                "segments": [
                    {
                        "distance": 8898.8,
                        "duration": 1010.4,
                        "steps": [
                            {
                                "distance": 75.9,
                                "duration": 54.7,
                                "instruction": "Head northeast on Alter Hof",
                                "name": "Alter Hof",
                                "type": 11,
                                "way_points": [
                                    0,
                                    3
                                ]
                            }

Is there a way to get more information about the road step besides distance, duration, instruction, name, type? For ex. maximum car speed limit(ex. 100) and/or road type (ex. motorway)?

Update:

I can request extra info that can be added to the route segments including the road type, but information regarding speed limits is not possible.

On the interactive docs page there is an option called extra_info that I can use to get some of this data, but the data that is returned isn’t a clear text value, but instead an id that needs to be mapped to the value which can be found at https://github.com/GIScience/openrouteservice-docs#routing-response. Also not all of the extra_info values are applicable to all of the profiles.


Solution

  • I can request extra info that can be added to the route segments including the road type, but information regarding speed limits is not possible.

    On the interactive docs page there is an option called extra_info that I can use to get some of this data, but the data that is returned isn’t a clear text value, but instead an id that needs to be mapped to the value which can be found at https://github.com/GIScience/openrouteservice-docs#routing-response. Also not all of the extra_info values are applicable to all of the profiles.