Inverse geotag and args file (?)

Started by Viktor Nemeth, July 13, 2024, 10:35:07 AM

Previous topic - Next topic

Viktor Nemeth

Hi Phil,

I'm back with my usual musings re args file.
Trying to do inverse geotagging.
I know that in most of the documentation you use whole folders but I'm trying to do stuff on a file-level basis. (aka assume not all files in a particular folder are of relevance for the output)
The following doesn't work (args file) [doesn't do anything useful that is]

d:\temp\dests\_DSC1458.dng
d:\temp\dests\_DSC1459.dng
-fileOrder=CreateDate
-p=gpx.fmt

things i'd like:
- specify what files' data to extract (kinda like the first two lines above)
- where the output gpx should be (this way i can avoid playing around with the ">" chars in cmd)
- specify the fmt file location (i think this can be done via cmd w/o issues but asking nonetheless.)
- specify fileorder (same as fmt location re comment)

help pls? :)
thanks

v.

StarGeek

Quote from: Viktor Nemeth on July 13, 2024, 10:35:07 AM- specify the fmt file location (i think this can be done via cmd w/o issues but asking nonetheless.)

For this, you would just use the path (full or relative) to the FMT file, e.g.
-p=c:\path\to\gpx.fmt
Quote- specify fileorder (same as fmt location re comment)

I'm not sure I understand. Without the -FileOrder option, the order should be the same as in the FMT file.  With the -FileOrder option, it will be ordered according to the tag used

Example. The temp.txt file has 8 files out of order, but each has a CreateDate in order with the filenames.  The first command lists them according to the order in the ARGS file, the second orders them according to the CreateDate
C:\>type temp.txt
Y:\!temp\Test1.jpg
Y:\!temp\Test7.jpg
Y:\!temp\Test2.jpg
Y:\!temp\Test9.jpg
Y:\!temp\Test3.jpg
Y:\!temp\Test5.jpg
Y:\!temp\Test6.jpg
Y:\!temp\Test4.jpg
C:\>exiftool -G1 -a -s -filename  -@ temp.txt
======== Y:/!temp/Test1.jpg
[System]        FileName                        : Test1.jpg
======== Y:/!temp/Test7.jpg
[System]        FileName                        : Test7.jpg
======== Y:/!temp/Test2.jpg
[System]        FileName                        : Test2.jpg
======== Y:/!temp/Test9.jpg
[System]        FileName                        : Test9.jpg
======== Y:/!temp/Test3.jpg
[System]        FileName                        : Test3.jpg
======== Y:/!temp/Test5.jpg
[System]        FileName                        : Test5.jpg
======== Y:/!temp/Test6.jpg
[System]        FileName                        : Test6.jpg
======== Y:/!temp/Test4.jpg
[System]        FileName                        : Test4.jpg
    8 image files read

C:\>exiftool -G1 -a -s -fileorder CreateDate -filename  -@ temp.txt
======== Y:/!temp/Test1.jpg
[System]        FileName                        : Test1.jpg
======== Y:/!temp/Test2.jpg
[System]        FileName                        : Test2.jpg
======== Y:/!temp/Test3.jpg
[System]        FileName                        : Test3.jpg
======== Y:/!temp/Test4.jpg
[System]        FileName                        : Test4.jpg
======== Y:/!temp/Test5.jpg
[System]        FileName                        : Test5.jpg
======== Y:/!temp/Test6.jpg
[System]        FileName                        : Test6.jpg
======== Y:/!temp/Test7.jpg
[System]        FileName                        : Test7.jpg
======== Y:/!temp/Test9.jpg
[System]        FileName                        : Test9.jpg
    8 image files read
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Viktor Nemeth

Hi StarGeek,

Thanks for that however it doesn't seem to work. If my arg file has the content
d:\temp\dests\_DSC1458.dng
d:\temp\dests\_DSC1459.dng
-p=gpx.fmt

i get Warning: Tag 'p' is not defined error
Also this doesn't specify the output gpx file name/path (?)

StarGeek

Sorry, I should have caught that. It's FAQ #29, "My options don't work in a -@ ARGFILE"

It should be
-p
c:\path\to\gpx.fmt
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Viktor Nemeth

That almost works! :) -- thanks

I have a screen output as such:
<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.0"
 creator="ExifTool 12.87"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://www.topografix.com/GPX/1/0"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<number>1</number>
<trkseg>
Warning: [minor] Bad IDC_IFD SubDirectory start - d:/temp/dests/_DSC1458.dng
Warning: [minor] Bad IDC_IFD SubDirectory start - d:/temp/dests/_DSC1459.dng
</trkseg>
</trk>
</gpx>

I can make the warnings hide with -q -q but any way to direct the output into a file? (without using the ">", ie within the args file

Phil Harvey

The output contains no points in the track. :(

Add -W+ out.gpx to your file to write the output to out.gpx.  The warnings will go to stderr, not to the output file, but you can add -m to suppress the minor warnings.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Viktor Nemeth