Use geographic distance calculation with postgis.