immich-go
immich-go copied to clipboard
for google photos, immich creates unnecessary XMP sidecar that duplicates embedded GPS data
In this scenario, there is a photo and it's associated supplemental-metadata.json. The photo contains embedded GPS location data, and the json has identical location data in both geoData and geoDataExif fields.
> exiftool '-gps*' photo.jpg
[Composite] GPSPosition : 35 deg 0' 43.86" N, 82 deg 33' 59.03" W
"geoData": {
"latitude": 35.012184,
"longitude": -82.5663982,
"altitude": -0.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
"geoDataExif": {
"latitude": 35.012184,
"longitude": -82.5663982,
"altitude": 0.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
When uplodaded with immich-go from-google-photos , In immich, a superfluous XMP sidecar is created that also has this GPS metadata.
<rdf:Description rdf:about=''
xmlns:exif='http://ns.adobe.com/exif/1.0/'>
<exif:GPSLatitude>35,0.73104N</exif:GPSLatitude>
<exif:GPSLongitude>82,33.983892W</exif:GPSLongitude>
</rdf:Description>
This XMP sidecar is unnecessary as immich will be able to detect the GPS location from the embedded data.
Immich-go should detect when the embedded and json GPS data are identical, use the embedded data when they are identical, and use the json data when they are not.
This is doable.