This object is in archive! 

Choose what date to use during import of GPX

Ladislav Forman shared this problem 9 years ago
Solved

Hi,

I'm using an external GPS device to record my tracks and usualy import the gpx file to locus later on. It's quite annoying that after import the date displayed on track list is always the date when you press the import button in locus. It ignores completely the real date stored in the GPX file or the creation date of the GPX file itself.

Could it be possible to choose the date in the import option dialog window so it would correspond with the real data?

Replies (9)

photo
1

Hello Ladislav,


if date is really in GPX files and Locus ignore this, then I consider this as an issue. Please share one file I should use for a testing, thank you.

photo
1

Here you go Menion. I've tried a lot of sources of GPX (SportTracks, MyTourBook, etc.) and alwys the same result.

photo
1

Perfect, thanks.

And now tell me, which date you expect? 6. 6. 2015? It is only date in this file, but this date is as metavalue for some general information about this file. But track and even a five separate points, do not have own date!

So I see here one simple solution - if GPX file will contain this date in metatag, Locus use this for all points or tracks, that do not have own defined date. If you agree, and I think so, consider it done.


EDIT: 15 minutes later, implemeted, tested, working as expected

photo
1

Yes I'd expect 6.6.2015. Sorry Menion but am I missing sth?...in the provided GPX file every track point has <time> tag. Only 5 waypoints taken along the road does not have it. Every soft or online service can recognize the date from the gpx. Locus could not.

Implemented means you've changed sth in locus or you put manually some metatag to gpx file?

Thx

photo
1

Hmm but times at every trackpoint is something different. If you display information for single trackpoint in Locus, I'm sure you will get a correct value. Did you tried it? (tap on track, edit on map, tap on trackpoint and in bottom panel tap on "info" button).


We are here talking about global time of whole track. This time should be also directly at track like this:


  1. <trk>
  2. <name>Choltice - Lichnice - Pařížov</name>
  3. <time>2015-06-06T08:00:00Z</time>
  4. <trkseg>
  5. <trkpt lat="49.986286" lon="15.618927">
  6. <ele>253</ele>
  7. <time>2015-06-06T08:00:42Z</time>

then it should work in old Locus version. Anyway in next version, Locus will correctly take a date from metadata tag here


  1. <metadata>
  2. <time>2015-06-06T08:00:42Z</time>
  3. <bounds minlat="49.8282928466797" minlon="15.5371999740601" maxlat="50.0153541564941" maxlon="15.6425752639771"/>
  4. </metadata>

and use it for a track.

photo
1

Brilliant! And yeah I was more talking about the track date in the general track list...I can see the individual trackpoint date. Thanks for the explanation and such a quick response! Your effort is much appreciated. Looking forward to the next version...as always :)

photo
1

Fine, good to hear it :). If you find any problem related to this topic, feel free to write me here!


Have a nice evening and thanks for useful report

photo
1

Hi Menion,


I have a similar problem with the creation date shown (and used for sorting) by Locus Map. When I create a track on GPSies.com and download it to PC, the correct creation date and time is found in the metadata section. But every track point has a date 2010-01-01. And so Locus Map shows the latter one as creation date, instead the one in the metadata. I copied the date from metadata to the place between the name (means track name) and the first trkseg as shown in your first screenshot, but this didn't change anything. The Problem with this is, that, when sorting the track list by creation date, all the imported tracks I created with GPSies.com are listed alphabetically sorted at the end of the list. So it is very hard to find a track I imported in the last weeks, if I don't know its name. I would prefer, if Locus Map would take the creation date from the metadata ever, and only would use the date from the first track point, if no metadata date is provided. Actually I have to copy the date manually from the metadata to the first track point for getting a correct creation date. This is not very useful.


And last but not least: Apart from that Locus Map is a very great and useful app.


tkansgar

photo
1

Hello tkansgar,

if Locus Map display track creation time, time of first trackpoint and not time from metadata, then it looks like we have back problem that was here fixed? Hmm may you please share one such track so I may test it? Thanks (you have to compress track to zip file to attach it here, thanks)

photo
1

Hi Menion,


it seems to be somewhat difficult to create such a sample. Sometimes the failure happens, sometimes it doesn't. Here are two small sample tracks created on GPSies.com. When I import Sample_wrong_date.gpx into Locus Map, it shows 01.01.2010 as its creation date in both the track list and on the track details page. But when I import Sample_correct_date.gpx, Locus Map shows the correct date in the track list. Only on the track details page the wrong date is shown. Very strange!


tkansgar

photo
1

Hello,

thanks, I think I've found a problem, so consider as fixed in new Locus Map version.

photo
1

Hi Menion,


the new version with this fix isn't available until now, right? Can you say, when it will be? In the actual version 3.21.1 still the date 2010-01-01 from the first track point ist shown and used for sorting in the track list.


tkansgar

photo
1

Hello,

not yet. Last version 3.21.1 was published 10. 1. 2017, fix was made 13. 1. 2017. So you may try Beta version or wait till final version will be published probably during end of next week.

photo
1

Hi Menion,


I now have version 3.23.1. In this one some tracks created on GPSies.com still show the date 2010-01-01 from the first track point (e.g. Eichenbruch.gpx in attached zip file), and this is used for sorting too. Some other tracks also created on GPSies.com show the real creation date from the metadata section (e.g. Max-Ziegler-Weg.gpx). I can't see any difference in these files, which could be responsible for the different behaviour of Locus Map. Can you?


tkansgar

photo
1

Hello,

really interesting. I've imported both track into empty track folder and both display correct times. How you look on these tracks? Directly display on the map or also import into database?

photo
1

Hi Menion,


1. My track folder isn't and wasn't empty when importing those tracks.

2. I imported them into database and displayed them on the map.


In the attached screenshot of track Eichenbruch from Locus Map you can see the date 01.01.2010 (german date format).


tkansgar

photo
1

Hello tkansgar,

I'm really sorry, but even after a spend a while looking into code, I have absolutely no idea, how this may happen. Time in "metadata" section is loaded as first and set to track during import. Time from trackpoints is set only in case, this ""metadata-time" does not exists. Sorry.

photo
1

Hi Menion,


then it seems, that my Locus Map sometimes doesn't recognize the metadata-time as a correct time value. And your version doesn't have any problem with it? Very strange! I will try to find out, what conditions lead to my problem by doing some modifications in the gpx-file and importing it again. And I will post, what I will find out.


tkansgar

photo
1

Unfortunately all works fine on my device.

When you find anything that may be useful, please let me know. Thanks

photo
1

Hi Menion,


just solved! The tracks, that were shown with date 01.01.2010, had been imported by the last version with the bug, that you fixed on 13.01.2017. I just imported all these tracks again. And now all dates are fine. I had thought, that the dates in database were correct and the error happened when reading the track data from database. So I thought also, that the new version would read the correct date from datebase. I didn't know, that the error happened at the import and the dates were wrong in database.


Many thanks for your support

tkansgar

photo
1

Hello,

ah perfect. That's why I wrote ( http://help.locusmap.eu/topic/choose-what-date-to-use-during-import-of-gpx#comment-39031 ) that after import , it works fine :). Yes, times had to be correctly loaded during import.

You are welcome, have a nice day!

photo
1

Hi Menion,


I was happy too soon! I just created a new track on GPSies.com (see attached gpx-file) and imported it in Locus Map (version 3.23.1). This track again shows 01.01.2010. Then I imported both, Eichenbruch.gpx and Eichenbruch-2.gpx, into an empty track folder. There also Eichenbruch shows 12.04.2017 and Eichenbruch-2 01.01.2010. Seems the bug isn't fixed totally till now. I now will try again to find out, what conditions lead to this failure by doing some modifications in both gpx-files and importing them again.


tkansgar

photo
1

Hi Menion,


I just found the "bug" (if it is one)! If the metadata time value is less than (or equal) the actual time minus two hours (the actual time zone in germany), this time is recognized as "incorrect" and therefore not accepted as creation date. So, if this cannot be fixed, I have to wait two hours or more or to move the time two hours into the past by editing the new gpx-file before importing it in Locus Map. Seems, that GPSies.com writes the local time value and Locus Map expects the UTC time value. Don't know, who is wrong here. I will inform the webmaster of GPSies.com about this too.


tkansgar

photo
1

Hello,

this was really really good observation. Issue in Locus Map found and fixed, thanks!

Btw. correct time in GPX files should be UTC+0.

photo
1

Hi Menion,


many thanks for your work and this info. Does that mean, that metadata time values in imported gpx-files, which lay in the future, won't be ignored by the next version of Locus Map? I ask this, cause the webmaster of GPSies.com obviously don't want to store the UTC time value of the creation time in the metadata time entry.


tkansgar

photo
1

Hello,

you are welcome. Yep, I had incorrect test on validity of times in app so time in "future" was consider as invalid and Locus used time from first trackpoint instead. This will be fixed in next version.

And fact that Klaus does not want to do any changes like this is completely understandable.

photo
1

Hi Menion,


what I wrote about, what Klaus doesn't want to change, may be a mistake. I think, he meant, he doesn't want to change the time values of the track points. So I just asked him, what about to change the metadata time value. I'm still waiting for his answer to this.


Many thanks again!


tkansgar

photo
1

Hi Menion,


Klaus didn't answer to that question. But no matter, the problem has gone with your last fix. Many thanks for this!


tkansgar

photo
1

Perfect, glad to hear it!

Have a nice evening.

Replies have been locked on this page!