Added new median function for road digitizer