public function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        if (!$value) {
            return null;
        }

        if ($platform instanceof MySqlPlatform) {
            $format = "POINT(%F %F)";
        } else {
            $format = "(%F, %F)";
        }

        return sprintf($format, $value->getLatitude(), $value->getLongitude());
    }