How to get the road type of each road segment travelled after map-matching

hey everyone,

My “big goal” is to figure how far cyclists are willing to go to use cycling paths instead of roads.

My plan is as follow. It lacks nuance, but it’s a first step and I just want to learn how to use graphhopper.

1- take bike gps data, map-match it using graphhopper and get the length of the trip and how much of it was spent on cycling paths vs roads
2- take the same bike gps data, get directions from the first point to the last point and get the length of the shortest trip.

If “2” is 10 kilometers of roads and “1” is 5 kilometers of roads and 10 kilometers of cycling paths, then the cyclist was willing to ride 10 kilometers of cycling paths to save 5 kilometers of road.

What I have done so far:

I am not sure how to do the next step, namely converting the map-matched GPX to a list of road segments travelled.

Is this feature offered by graphhopper map-matching?

edit: this was discussed here, I dont see a solution though : Include timestamps and OSM ids when generating .res.gpx

Powered by Discourse