Quantifying the distance effect in spatial interactions