ptrv/gpx2spatialite does this remarkably well, saving timestamps for all points and deriving speed and length data for tracks. It also won't import duplicate tracks, so you can feed it a huge pile for GPX files and it will munge them appropriately.
Update: usage examples, as requested:
Initialize new database:
gpx2spatialite_create_db db.sqlite
Add a single gpx file:
gpx2spatialite -d db.sqlite -u user file.gpx
(If username user does not exist in the database, will query if you wish to create it. The database is built with tracks/waypoints/routes assigned to one or more users.)
Add all of the gpx files in folder/:
gpx2spatialite -d db.sqlite -u user folder/
Usage: it's a spatial database, with table tracklines holding the tracks as polylines, trackpoints containing the individual points (with time, elevation, etc), and waypoints for any defined waypoints. There are also numerous indices, some world city definitions and possibly also embedded SLD styling information I haven't yet explored. As a trivial example, here's a map of how my hometown (Toronto) is defined through ~7 years of track logs:
By using lines at 75% transparency, the most frequently-travelled routes become darker.
Working (albeit cumbersome) solution to convert KML-/KMZ-files with <gx:Track>
-Extension to gpx/csv/tcx, via Googles MyTracks-App.
I tried to import a .kmz-file to QGIS, containing a GPS-track as <gx:track>
-Element. (Track was recorded with MyTracks-App on Android. I only had the .kmz
.)
After numerous attempts, using various tools (GPS-Tools-PlugIn, GPSBabel, some online tool, etc.) which never converted the track (i.e. LineString) but only the point features, i remembered that MyTracks offers an import-option as well. So imported the .kmz
to MyTracks , exported the track as .gpx
and was finally able to import the .gpx
to QGIS. Job done.
Here is a brief, illustrated HowTo, just in case someone is interested (sry for german UI):
1.) Copy .kmz
to MyTracks/kml
on device.
2.) Import all external KML-tracks in MyTracks-App
3.) Select imported track and export to external storage as GPX, CSV or TCX.
4.) Locate exported track in corresponding directory (i.e. MyTracks/gpx, MyTracks/csv or MyTracks/tcx) and copy/move to PC/Mac.
5.) Eat cake!
6.) Proceed with original task. (e.g. import to QGIS)
Best Answer
Does it help to insert points into the way geometry?
Sometimes ways don't get rendered if all points of the way are outside the current window.
[EDIT 2] from user19425 I can't seem to add a separate comment, possibly because this is a closed question. But anyway thanks Joost, that worked. Are you aware if this is a tracked bug?