metadata/gps: City detection from 100 to 15 km

The original idea was that it's helpful to at least know the very rough
location of an image. In practice that mostly seems to be confusing. So
reducing this to a much smaller distance.

Closes #318

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/370>
This commit is contained in:
Sophie Herold 2024-02-09 21:27:04 +01:00
parent 8b60dc7dcb
commit 5f023a2b40

View file

@ -145,8 +145,8 @@ impl GPSLocation {
self.longitude.to_f64(),
);
// do not use city if more than 100 km away
if location.distance(&location_exact) < 100. {
// do not use city if more than 15 km away
if location.distance(&location_exact) < 15. {
if let (Some(city), Some(country)) = (location.city_name(), location.country_name())
{
return format!("{city}, {country}");