Uber Nairobi Ambulance Perambulation Challenge
$6,000 USD
Can you use ML to create an optimised ambulance deployment strategy in Nairobi?
683 data scientists enrolled, 205 on the leaderboard
17 September—24 January 2021
Ends in 2 months
Mapping osm_way_id to segment_id or finding which segment_id in road_survey corresponds to which segment_id in speeds data
published 21 Oct 2020, 10:49

How to map osm_way_id in uber movements speeds data to segment_id in road survey data?

All the way IDs have a start_node_id and an end_node_id, you might want to use those instead to get the latitude and longitude of the start point and end point of that "way"


1. Go to http://www.overpass-api.de/query_form.html (use the OverPass API Query Form)

2. Use the example script below (where the ref is the start or end node ID that you have.)

<osm-script> <id-query ref="507464799" type="node"/><print/> </osm-script>

3. Click on "query", then download the converted Latitudes and Longitudes

4. Each segment is a polygon, so when you get the Start and End Node of that 'way', you can convert it into a LineString, then depending on what is most convenient for you, check if that line "intersects", or is "contained" in the segment Polygon, or find the segment that the line is closest to.

Whichever you decide to use might help to approximate the behaviour of the "segment".

I hope this helps.