Functions to perform simple map matching for labeling purposes