added ISO19108 function tm_distance