jd7h / clothing-swap-route

Generate a route (ordering) of clothing loop participants
0 stars 1 forks source link

Add OSRM routing building blocks, fixes #19 #20

Closed mrngm closed 1 year ago

mrngm commented 2 years ago

Output based on the example data:

$ python main.py -i ../example_data/participants.csv -g -d -r
[DBG] read_participants(../example_data/participants.csv):
[..]
[{'latitude': 51.8433956, 'longitude': 5.8643101}, {'latitude': 51.8152491, 'longitude': 5.8514569}, {'latitude': 51.8454346, 'longitude': 5.8644696}, {'latitude': 51.8431339, 'longitude': 5.8613668}, {'latitude': 51.8473778, 'longitude': 5.861643}, {'latitude': 51.8430394, 'longitude': 5.86248}, {'latitude': 51.8487504, 'longitude': 5.8644206}, {'latitude': 51.8479247, 'longitude': 5.8635052}, {'latitude': 51.8361658, 'longitude': 5.8782252}, {'latitude': 51.8479623, 'longitude': 5.863836}, {'latitude': 51.8357071, 'longitude': 5.8745025}, {'latitude': 51.8489141, 'longitude': 5.862433}]
Expected distance: 17980.5 meters
Routing provided by FOSSGIS, data © OpenStreetMap, ODbL, CC-BY-SA, contribute: https://openstreetmap.org/fixthemap

This PR contains a few TODOs to make the parsing of routing data more robust. The notice that routing is provided by FOSSGIS may be improved as well (see the supplied README.md changes).