Write GPX File, but with GPSImgDirection Information

Started by mprbmaps, April 10, 2024, 05:57:45 PM

Previous topic - Next topic

mprbmaps

I am able to write a gpx file and it is successful, but is it possible to add the gpsimgdirection to the gpx file format?

Phil Harvey

I assume you are using the -p option and a print format file?  Then the answer is yes, just add whatever you want to the print format file.

- 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 ($).

mprbmaps

Quote from: Phil Harvey on April 10, 2024, 09:21:02 PMI assume you are using the -p option and a print format file?  Then the answer is yes, just add whatever you want to the print format file.

- Phil

Phil,

I am guessing I can just do this?



#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]<trk>
#[HEAD]<number>1</number>
#[HEAD]<trkseg>
#[IF]  $gpslatitude $gpslongitude
#[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
#[BODY]  <ele>$gpsaltitude#</ele>
#[BODY]  <imgdir>$gpsimgdirection#</imgdir>
#[BODY]  <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
#[BODY]</trkpt>
#[TAIL]</trkseg>
#[TAIL]</trk>
#[TAIL]</gpx>

Phil Harvey

Yes.

Also, this points out the fact that I should update the gpx.fmt file because the GPSDateTime line may be simplified:

#[BODY]  <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%S%fZ")}</time>

- 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 ($).