Hello,
can I create a CSV file that does this:
filename, gps [gps cords and name of city, country etc.]
there is this api:
when I execute this:
curl "https://nominatim.openstreetmap.org/reverse?format=geojson&lat=52.2797235&lon=6.7144513" | jq '.features[].properties.display_name'
I get
IJsbaanweg, Ambt Delden, Hof van Twente, Overijssel, Nederland, 7495VK, Nederland
I just want a CSV file that has this data , or does exiftool has a better way to do this?
or can I create a bash script to get what I want with or without a frm file?
ExifTool can not look up place names based on GPS coordinates if that is what you are trying to do.
I don't know what an frm file is.
- Phil
Shoot my bad I mean fmt file for the -printFormat
But I fixed it
this is my bash script:
#!/bin/bash
output_file="/Users/ralphschipper/temp/test.csv" # <- Choose your output file here
echo "Name\t GPS\t Place" > "$output_file"
for file in "$@"; do
lat=$(/usr/local/bin/exiftool -T -n -c "%.7f" -GPSLatitude "$file")
lon=$(/usr/local/bin/exiftool -T -n -c "%.7f" -GPSLongitude "$file")
if [[ ${#lat} -gt 2 ]]
then
geo=$(curl -s "https://nominatim.openstreetmap.org/reverse?format=geojson&lat=${lat}&lon=${lon}" | jq '.features[].properties.display_name')
data=$(/usr/local/bin/exiftool -T -filename "${file}")
data+="\t"
data+="$lat,$lon"
data+="\t"
data+=$geo
else
data=$(/usr/local/bin/exiftool -T -filename "${file}")
data+="\t"
data+="-"
data+="\t"
data+="-"
fi
echo $data >> "$output_file"
done
open "$output_file"
what it does?
open this bash file and drag some photo's to the terminal
if the photo has GPS data it wil show the city, street, country etc.
for the photo's that does not have gps data you see a minus sign (-)