Author Topic: TMP files  (Read 3655 times)

PH

TMP files
« on: 27 May, 2013, 05:37:23 pm »
I have an Etrex 20, which for the most part has been great, though I've had a couple of problems with the saving of tracks.  Occasional they archive as a TMP file rather than a GPX file.  I've just been away for four days, day two is a TMP file the other three GPX.  As far as I'm aware I haven't done anything different each day.  So, does anyone know why it would do this and if there's anything I can do to stop it?  Also, does anyone know if I can change the TMP file to a GPX one?  I can open it in notebook but not with my usual mapping (Memory Map and Basecamp) Simple answers appreciated, I'm not the most computer literate :-\

Feanor

  • It's mostly downhill from here.
Re: TMP files
« Reply #1 on: 27 May, 2013, 05:55:41 pm »
I think it's caused by the software crashing or battery failure or somesuch before it's properly closed out the file.

I've repaired a few for folks on here, and it's always been the closing xml tags that have been missing.
The file has been truncated in the middle of a trackpoint.
Manual editing of the tracklog in notepad or similar is required to tidy up the end of the file and add the missing tags.

It will then upload fine.

If you want to send me the tmp file, I can pm you an e-mail address, and I can either fix it here, or provide you with instructions on how to fix it yourself.

PH

Re: TMP files
« Reply #2 on: 27 May, 2013, 06:31:07 pm »
That would be great, email sent,

Feanor

  • It's mostly downhill from here.
Re: TMP files
« Reply #3 on: 27 May, 2013, 07:04:18 pm »
Here's what I did:
First problem is that there are no line-breaks in the file, and all the xml elements run together.  Snipped example:

Code: [Select]
<trkpt lat="54.0936185326" lon="-1.4954326954"><ele>28.98</ele><time>2013-05-25T15:44:36Z</time></trkpt><trkpt lat="54.0936553292" lon="-1.4953642990"><ele>28.50</ele><time>2013-05-25T15:44:37Z</time></trkpt>
So using notepad++, I used the Search / Replace function in 'extended' mode to replace '><' with '>\r\n<' to give this format:

Code: [Select]
<trkpt lat="54.0505749453" lon="-2.1588976309">
<ele>207.30</ele>
<time>2013-05-25T08:12:53Z</time>
</trkpt>
<trkpt lat="54.0503291041" lon="-2.1592391934">
<ele>205.86</ele>
<time>2013-05-25T08:12:56Z</time>
</trkpt>

Now, look at the end of the file:

Code: [Select]
<trkpt lat="54.0936553292" lon="-1.4953642990">
<ele>28.50</ele>
<time>2013-05-25T15:44:37Z</time>
</trkpt>
<trkpt lat="54.0938047785" lon=

The last valid trackpoint is shown, along with the final incomplete one.
I deleted the incomplete trackpoint.

Now, to close out the un-matched XML elements.
Look at the top of the file, there are 3 things which have been started, but don't have their corresponding close tags at the end of the file - <gpx>, <trk> and <trkseg>:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" [....] >
<metadata>
<link href="http://www.garmin.com">
<text>Garmin International</text>
</link>
<time>2013-05-26T08:05:54Z</time>
</metadata>
<trk>
<name>2013-05-25 08:58:26 Day</name>
<extensions>
<gpxx:TrackExtension>
<gpxx:DisplayColor>DarkYellow</gpxx:DisplayColor>
</gpxx:TrackExtension>
</extensions>
<trkseg>
[...]

So at the end of the file, I close them out, adding the 3 lines at the bottom:

Code: [Select]
<trkpt lat="54.0936553292" lon="-1.4953642990">
<ele>28.50</ele>
<time>2013-05-25T15:44:37Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>

Then I saved it as <filename>.gpx.

Re: TMP files
« Reply #4 on: 09 August, 2015, 10:44:08 pm »
This worked like a charm - ta!

[edit] bugger I must have done it wrong [/edit]

[edit] didn't follow simple instructions - yay - ta![/edit]

LittleWheelsandBig

  • Whimsy Rider
Re: TMP files
« Reply #5 on: 06 February, 2016, 10:26:12 pm »
The assistance here seems the best on the net. Thanks Feanor.
Wheel meet again, don't know where, don't know when...

Re: TMP files
« Reply #6 on: 04 May, 2017, 07:17:51 pm »
Hello

I used my garmin nuvi 2597 recently during a route survey for a motorrally.

When I checked the GPX?Archive folder, I found the file to be in a tmp format.

I cannot open this file in BAsecamp or Mapsource to extract the map.

Please assist

Regards

Nikunj