GpxWriter.writeTrack(trk, new File(dir, name + ".gpx"));
}
if (xol) {
XolWriter.writeTrack(trk, new File(dir, name + ".xol"));
}
Summary summary = Summary.compute(trk);
Profile.writeProfile(trk, 600, 200,
new File(dir, "profile.png"));
VelocityContext context = new VelocityContext();
context.put("name", name);
context.put("title", "Map for " + name);