Change from naive dist to geo dist.