get_gps_info used to return data if any of lat/long/alt were available, now only does so if all are
In 0.12.1 and earlier, the gexiv2_metadata_get_gps_info
function used to return TRUE
if any of latitude, longitude, or altitude were available, even if not all three could be retrieved. That version of the code is here: https://gitlab.gnome.org/GNOME/gexiv2/blob/gexiv2-0.12.1/gexiv2/gexiv2-metadata-gps.cpp#L186
In 0.12.2, the behaviour changed so that all three had to be present for the function to return TRUE
. If even a single one is unset, FALSE
is returned. That version of the code is here: https://gitlab.gnome.org/GNOME/gexiv2/blob/gexiv2-0.12.2/gexiv2/gexiv2-metadata-gps.cpp#L246
Not having all three fields set a fairly common scenario, since some tools only set lang/long when drawing on a map, and don't record altitude.
The change appears to have happened in commit f2d96b4d, which is primarily about introducing the newer try_
variants that pass on error messages, and doesn't mention any intended change in behaviour for reading GPS data. It's also not mentioned in the release notes for 0.12.2. That makes me wonder if this was perhaps unintentional?
Should gexiv2_metadata_try_get_gps_info
return data only if all three of lat/long/alt are set, or should it return whatever is present and only fail if nothing at all is there?
Thanks!