Exporting Geojson output to pandas dataframe

Hi there,

I’m new to both Python as well as using the Openroute service. The following is the “Route” info from an example of using VRO with 2 vehicles. My question is, how can I take the “Route” info (I’m assuming its GeoJSON?) and load it into a table or dataframe?

Hi @komasi75,

to return the route you need to set
"options":{"g":"true"} in your request.
The geometry is returned as encoded polyline.

For decodeing see Geometry Decoding | openrouteservice backend documentation.

How to put geojson into a dataframe or table you should look up at the (geo-)pandas doc or something similar.

Best regards

1 Like