printFormat file for KML track extensions

Started by dnhxx, November 15, 2020, 04:35:32 PM

Previous topic - Next topic

dnhxx

Hello,

I am trying to create a amp using data from a dash cam mp4 file.  The example track printFormat file works great.  I am wondering if a printFormat file can be written to create a kml file that uses the KML extension for tracks <gx:Track> .  an example can be found here:

https://developers.google.com/kml/documentation/kmlreference?csw=1#trackexample

For the dash cam, it would be nice to create extended data with speed and altitude (if present).

It is the extended data section that is got me stumped. I can't figure out how to extract the speed data and place that in the <ExtendedData><gx:value>  tags at the same time as placing gps location data in the <gx:coord> tag.  If I use two #[BODY], all the extracted data is placed together rather than where the [BODY] tags are.


#[BODY]<gx:coord>$gpslongitude#,$gpslatitude#,0</gx:coord>
#[SECT]      <ExtendedData>
#[SECT]             <SchemaData schemaUrl="#schema">
#[SECT]               <gx:SimpleArrayData name="cadence">
#[BODY]<gx:value>$gpsspeed#</gx:value>
#[ENDS]          </gx:SimpleArrayData>
#[ENDS]         </SchemaData>
#[ENDS]      </ExtendedData>
#[ENDS]     </gx:Track>


Just wondering if that is possible.


thank you

StarGeek

There is a KML format file as part of the complete perl version on the main page and in the fmt_files directory on github.
"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

dnhxx

That is the file I used.  IT doesn't support the extended Track tag that I am looking for.

Phil Harvey

I don't think you want to use SECT/ENDS.  Put all of the lines in the BODY.

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