Added write_exif function, calculates location in degree / minutes.
Assembles metadata info and writes them to the target_image.
This commit is contained in:
@@ -6,7 +6,6 @@ DateTimeOriginal from Exif tag to DateTime in a csv log
|
||||
of a GeigerMuellerCounter and writes its value to the UserComment
|
||||
Exif tag in µS/h '''
|
||||
|
||||
from datetime import datetime
|
||||
import csv
|
||||
import argparse
|
||||
import pytz
|
||||
@@ -61,7 +60,6 @@ with open(args.csv, "r") as f:
|
||||
for _, csv_raw_time, csv_raw_cpm, _ in csv:
|
||||
radiation = Radiation(csv_raw_time, csv_raw_cpm, local_timezone, args.sifactor)
|
||||
radiation_list.append(radiation)
|
||||
#print(radiation_list)
|
||||
|
||||
# close CSV file
|
||||
f.close()
|
||||
@@ -77,7 +75,6 @@ if args.gpx is not None:
|
||||
for point in segment.points:
|
||||
position = [point.time, point.latitude, point.longitude, point.elevation]
|
||||
position_list.append(position)
|
||||
# print(position_list)
|
||||
|
||||
# Inform the user about what is going to happen
|
||||
if args.dry is True:
|
||||
@@ -95,12 +92,11 @@ for src_photo in args.photos:
|
||||
# Here the matching magic has to happen
|
||||
latitude = 51.0234024
|
||||
longitude = 7.248347
|
||||
radiation = '9001'
|
||||
elevation = '55'
|
||||
radiation = 9001.15
|
||||
elevation = 56.079345703125
|
||||
|
||||
# Write exif data
|
||||
exif_tags = Exif(photo.get_target_photo, radiation, latitude, longitude, elevation, args.dry)
|
||||
print(exif_tags)
|
||||
|
||||
# Print table header
|
||||
print('{:<15} {:<25} {:<22}'.format('filename', 'date / time', 'Exif UserComment'))
|
Reference in New Issue
Block a user