Trajectories to extinction: spatial dynamics of the contraction of geographical ranges