Distance is a basic concept in the issue of animal species motion. Cost distances are seeing increasing use, to measure a realistic distance, by means of resistance values given for each landscape types. Here, we propose a method to compute resistance values by using “topological functions of landscape”, i.e. by taking account of proximity to habitat/ non-habitat edges. We used a data set concerning the spreading of the fossorial water vole outbreak in the Franche-Comté region, and we tested several functions. The results show that statistical correlations clearly increase in comparison with usual cost-distances