I know that this has already been answered .. but I couldn't use the answer and kept coming back to this question on every google search I did. So I made a mini python program to make a bunch of .gpx files into one big file. Thus getting around the problem of loading multiple files. Hopefully this helps someone else.
Once you have your new gpx file load it through the GPXtools plugin.
Copy and paste into a PLAIN text file. This code assumes you have python (2.x) installed. Made for Ubuntu, but should work on Windows or Mac
1. Open a terminal (Linux, Mac) or command prompt (Windows).
2. Type in "python <the name of this file> <the name of the folder containing
you gpx files to combine>" 'Naturally withought quotes ;|'
3. Visit said folder and look for a file called "CombinedGPX.gpx"
4. Post if this doesn't work and/or maybe update this program so it does.
# This program will combind all gpx files in a given location into one large file.
# NOTE: the metadata of the first file (this is arbitrary and decided by the OS)
# is kept, all other metadata is forgotten.
# Possible additions .. make program execute from drag and drop **later
#chmod +x <filename>
#python <source_file.py> "$1"
# Get location from user
# This input should be in the form: $ python <gpxcombiner.py> <GPXFolder/>
# NOTE: the second argument MUST end with a "/"
gpxdir = sys.argv
gpxfiles = glob.glob(gpxdir + "*.gpx")
bigGPX = gpxdir + 'CombindedGPX.gpx'
# Remove precombined GPX file so you don't get an infintely expanding file
except ValueError: # Ignore this if file doesn't exist
print "Directory contains: " + str(len(gpxfiles)) + " .gpx files to be amalgamated."
def split_file(filename, body_start_split='</metadata>', body_end_split='</gpx>'):
data = filename.read()
start_body = data.find(body_start_split) + len(body_start_split)
end_body = data.find(body_end_split)
header = data[:start_body]
body = data[start_body:end_body]
footer = data[end_body:]
return header, body, footer
first_file, gpxfiles = gpxfiles, gpxfiles[1:]
with open(first_file, 'r') as infile:
header, body, footer = split_file(infile)
with open(bigGPX, 'w') as outfile:
for fname in gpxfiles:
with open(fname, 'r') as infile:
header, body, null = split_file(infile)
print bigGPX + " created, contains combined data."