Combining representations of topology and distance