I am currently doing a project where we are trying to do road quality predictions, to better predict which roads needs repair when.
To achieve this we have had people on bikes gather data using a bike with a GPS and other measuring devices on them. From this we have gotten data from the same area, spread over about a year, of various people biking around in it:
Different colors represent data from different dates.
I would now like to match these gps coordinates up against the known bike paths in the area with the goal of cutting the bike path into different segments and aligning/interpolating the measurements to these different segments, such that I can use each segment as a data sample, and predict the current and future quality of that road segment.
My question is how can I extract the bike path gps coordinates or segments? I’m assuming that there is a somewhat standard procedure for this, but I am quite inexperienced in using open street maps.
Well, no, there isn’t a standard procedure for that. There are different mapping conventions for bicycling infrastructure in different countries and even different conventions in different parts of the same country
One possibility would to use Overpass-Turbo to get data of bike paths.
Here an example,
/*
get bike paths in the area shown in Overpass Turbo
*/
[out:json][timeout:25];
// gather results
(
// highway=cycleway is a bike path for sure
way["highway"="cycleway"]({{bbox}});
// if a way is tagged bicycle=designated too
way["bicycle"="designated"]({{bbox}});
// cycleway tagged as part of the road (lane) or separate (track)
way["cycleway"~"^(lane|track)$"]({{bbox}});
way["cycleway:right"~"^(lane|track)$"]({{bbox}});
way["cycleway:left"~"^(lane|track)$"]({{bbox}});
way["cycleway:both"~"^(lane|track)$"]({{bbox}});
);
// print results
out geom;
You can export the result with the “Export” button, i.e. as GPX file.
You can use a search area instead of the bounding box, in my example the suburb Zollstock of Cologne:
/*
bike paths in the suburb Zollstock.
*/
[out:json][timeout:25];
// fetch area “Zollstock” to search in
{{geocodeArea:Zollstock}}->.searchArea;
// gather results
(
way["bicycle"="designated"](area.searchArea);
way["cycleway"~"^(lane|track)$"](area.searchArea);
way["cycleway:right"~"^(lane|track)$"](area.searchArea);
way["cycleway:left"~"^(lane|track)$"](area.searchArea);
way["cycleway:both"~"^(lane|track)$"](area.searchArea);
way["highway"="cycleway"](area.searchArea);
);
// print results
out geom;
And I’m sure I missed one tagging possibilty or two
It might actually make sense to run this against a reduced network of only cycle(able) infrastructure to reduce errors. I would defer to somebody with actual practical experience doing that for an opinion.