public function distanceTo(Geo $dest, $round = 2, $km = false)
{
$distance = null;
if (null === $this->latitude || null === $this->longitude) {
throw new Exception('The origin coordinates are not set.');
}
if (null === $dest->getLatitude() || null === $dest->getLongitude()) {
throw new Exception('The destination coordinates are not set.');
}
$origin = array('latitude' => $this->latitude, 'longitude' => $this->longitude);
$destination = array('latitude' => $dest->getLatitude(), 'longitude' => $dest->getLongitude());
return self::calculateDistance($origin, $destination, $round, $km);
}