Seite 1 von 1

GPS information in jpeg speichern

Verfasst: Mittwoch 16. Januar 2013, 14:51
von mit
Hallo,
Ich habe viele Photos (jpeg) von einer bestimmten location. Ich habe diese location in Google Earth gefunden und in eine KML/KMZ gespeichert.

Wie kann man aus der KML/KMZ file die GPS Information in Jpeg uebernehmen?

Vielen Dank im Vorraus.

Re: GPS information in jpeg speichern

Verfasst: Mittwoch 16. Januar 2013, 15:46
von sparrow
KML-Dateien solltest du mit einem entsprechenden XML-Parser gut lesen können.

Mit pexif habe ich mal EXIF-Daten in Bilder geschrieben, das ist aber schon eine Weile her. Scheint auch nicht so, als ob das noch entwickelt wird.

Re: GPS information in jpeg speichern

Verfasst: Donnerstag 17. Januar 2013, 00:52
von Leonidas
sparrow hat geschrieben:Mit pexif habe ich mal EXIF-Daten in Bilder geschrieben, das ist aber schon eine Weile her. Scheint auch nicht so, als ob das noch entwickelt wird.
Wobei meine Erfahrung ist, dass EXIF und JPEG recht stabil sind und wenn das mal funktioniert hat, auch in Zukunft funktionieren wird. Aber das Stichwort ist auf jeden Fall mal EXIF, wo die GPS-Daten abgespeichert werden. Dazu braucht es keine KML-Dateien, die Koordinaten (+ sonstiger Geo-Tag-Kram) sollten reichen. Zur Not kannst du natürlich auch einfach ein Kommandozeilentool einbinden, welches die Datei editiert.

Re: GPS information in jpeg speichern

Verfasst: Donnerstag 17. Januar 2013, 02:58
von mit
Danke, ich habe es wie folgt geloest:

1. Find in Google Earth your location
2. Use Add Placemark and save it to KML file
3. With http://geotag.sourceforge.net/ open one picture eg .IMGP0087.JPG and use the values from your KML file
(KML file <coordinates>longitude,latitude,altitude</coordinates>).
4. Save it and close geotag.
6. You can check it with
exiftool -GPSLongitude -GPSLatitude IMGP0087.JPG
5. To apply all GPS information to all pictures use
exiftool −overwrite_original_in_place -r -tagsFromFile IMGP0087.JPG -gps:all .
the -r option recurses into the directory (.)