Reorder waypoint and track writing on export.

The GPX schema requires waypoints to come before the track.

Waypoints are not currently used in TCX export, so there are no
changes there.

In KML files, both tracks and waypoints are "Placemark"s, so it
doesn't matter what order they come in there.

This does change the order they appear in CSV files, which could
potentially invalidate some assumptions made in downstream tools.
This commit is contained in:
Jared Casper
2011-02-09 10:42:34 -08:00
parent b42142f692
commit c4fe4d87db
3 changed files with 7 additions and 8 deletions
@@ -143,7 +143,6 @@ public class GpxTrackWriter implements TrackFormatWriter {
@Override
public void writeWaypoint(Waypoint waypoint) {
if (pw != null) {
// TODO: The gpx spec says waypoints should come *before* tracks
Location l = waypoint.getLocation();
if (l != null) {
pw.println("<wpt lat=\""