.gpx file from images

Started by ChatMauve, November 21, 2018, 07:22:18 AM

Previous topic - Next topic

ChatMauve

Hello,

So I am struggle with JavaSript.
My goal is to obtain a .gpx file from images (where are the strawberries ?)

Is a way to obtain gps data in raw mode ?

'taglatitude' = 'gpslatitude' obtain it in formated mode

Fa

Mario

#1
You can request metadata contents with several endpoints. Which one do you use?

If you use the /files endpoint, you can request the raw data for tags using the rtag (raw tag) parameter.

For example to get the lat/lng for all files currently selected in the file window, you would do a


IMWS.get('v1/files',{
    idlist: IMatch.idlist.fileWindowSelection,
    fields: 'id,name',
    rtaglat: 'gpslatitude',
    rtaglng: 'gpslongitude'
}).then(function(response) {
    console.log(JSON.stringify(response));
});


This returns the id, name and lat/lng for all selected files. The returned JSON looks like this:




You can also request a dateTime tag to have a timestamp for your GPX file (created or maybe modified) and you're all set.
Just format the values correctly to GPX format, store the result in a string and then finally use the IMatch.writeTextFile (in the IMatchLib helper class) to save the GPX file to disk.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ChatMauve