[OSM-dev] GPX files

Tom Hughes tom at compton.nu
Tue Jun 5 23:51:37 BST 2007


In message <20070605192133.735suzrf480s8sk8 at webmail.systemed.net>
          Richard Fairhurst <richard at systemeD.net> wrote:

> With that installed... it looks to me as if timestamps from GPX files
> are not currently being imported into the database.

It seems you are correct - the parser pulls them out of the file but
they are never added to the records being written to the database.

Try the attached patch for a fix...

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
-------------- next part --------------
Index: app/models/trace.rb
===================================================================
--- app/models/trace.rb	(revision 3107)
+++ app/models/trace.rb	(working copy)
@@ -110,6 +117,7 @@
         tp.lat = point['latitude'].to_f
         tp.lng = point['longitude'].to_f
         tp.altitude = point['altitude'].to_f
+        tp.timestamp = point['timestamp']
         tp.user_id = user.id
         tp.gpx_id = id
         tp.trackid = point['segment'].to_i


More information about the dev mailing list