Calculating Port Distance & Selecting Routing Point