Skip to content
Snippets Groups Projects
README.md 1.48 KiB
Newer Older
Ting Gao's avatar
Ting Gao committed
# mm4b

Ting Gao's avatar
Ting Gao committed
Welcome to the map-matching package tailored for bicycles! The paper can be found here: https://doi.org/10.1049/itr2.12567.
Ting Gao's avatar
Ting Gao committed

Ting Gao's avatar
Ting Gao committed
## Preparatory work
1. Create a folder graph/raw/ to store raw road network information
2. Create mapMatch_result/ to store the processed road network
3. Create mapMatch_result/ptsDf_/ to store the selected road candidates (within 50m)
4. Create mapMatch_result/rlt_/viterbi/ to store the map-matched result
5. Put the OpenStreetMap shapefile in the raw_map folder
6. Put the raw GPS data as data/stepII.h5, csv form as data/stepII.csv. Columns:tripID;timestamp;lat;lon.
Ting Gao's avatar
Ting Gao committed

Ting Gao's avatar
Ting Gao committed
## Run steps
1. In local computer, run step1_simplify_graph.py and step2_main_road_evaluation.py 
2. Sbatch step3_supercomputer_run.sh on supercomputer or run parallel_run.py with function_name=getsPts in server
3. Sbatch step4_supercomputer_run.sh on supercomputer or run parallel_run.py with function_name=matchTrace in server
Ting Gao's avatar
Ting Gao committed

Ting Gao's avatar
Ting Gao committed
## Output format
Output results are in mapMatch_result/rlt_/viterbi/, format: 
tripID: identity of each trip trajectory to be mapped
nid: recorded order of GPS point
edge: mapped road segment ID in the compact graph (section 3.2)
full_edge: 	mapped road segment ID in the raw graph
dist: distance (m) between GPS point and the mapped road 
frcalong: travelled ratio over this edge	
secs: time difference (s) from 2020-10-01	
seglength: 	travelled distance (km) over this edge

## Acknowledgement
Part of code in this repository is derived from "https://github.com/amillb/pgMapMatch".