fotografie:metadaten

~/perl/geotag_place.pl

trägt folgende Metadaten in die (Raw-)Dateien ein:

  • Urheber

    CreatorCity : Bad Reichenhall
    CreatorCountry : Germany
    CreatorAddress : Wisbacherstr. 6
    CreatorPostalCode : 83435
    CreatorRegion : Bavaria
    CreatorWorkEmail : m.spring@gmx.de
    CreatorWorkTelephone : +4986512717
    CreatorWorkURL : https://markus-spring.info
    Creator : Markus Spring
    Rights : Markus Spring m.spring@gmx.de

  • GPS-Daten bei erfolgreicher Suche nach dem Zeitstempel in einer gpx-Datei

    GPSAltitude : 453.2 m Above Sea Level
    GPSDateTime : 2020:04:12 16:55:49Z
    GPSLatitude : 47 deg 45' 8.04“ N
    GPSLongitude : 12 deg 54' 33.93” E
    FocalLength35efl : 0.0 mm
    GPSPosition : 47 deg 45' 8.04“ N, 12 deg 54' 33.93” E

  • Adressdaten durch Reverse-Geocoding aud den GPS-Daten

    Sub-location : Lindenstraße
    Province-State : Bavaria
    Country-PrimaryLocationCode : DEU
    Country-PrimaryLocationName : Germany

Darktable

Erwartet

HierarchicalSubject             : Where|Germany|Bavaria|Bad Reichenhall
Updaten vorhandener Bilder
#!/bin/bash
for f in ~/Bilder/2020/04/import/*ARW; do
    if [ ! $(exiftool -a $f | grep -i gps | wc -l) -lt 1 ]; then
        city=$(exiftool -a -s $f | egrep -i "^city" | awk -F ' : ' '{print $2}')
        if [ -z "$city" ]; then
            geotag_place.pl -v --overwritegps --overwritegeoplace --gpxdir ~/.gps $f
        fi
        city=$(exiftool -a -s $f | egrep -i "^city" | awk -F ' : ' '{print $2}')
        sublocation=$(exiftool -a $f | grep -i sub-location | awk -F ' : ' '{print $2}')
        country=$(exiftool -a -s $f | grep -i country-primarylocationname | awk -F ' : ' '{print $2}')
        state=$(exiftool -a -s $f | grep -i province-state | awk -F ' : ' '{print $2}')
        #echo " where|$country|$state|$city|$sublocation"
        targetfile=$f
        if [ -f "$f.xmp" ]; then
            targetfile=$f.xmp
        fi
        # echo $targetfile
        exiftool -HierarchicalSubject+="Where|$country|$state|$city|$sublocation" $targetfile
    fi
done
  • fotografie/metadaten.txt
  • Last modified: 2021/11/15 06:30
  • by springm