From f86cadb80276f890186d3f9d677cb6693bed9d9a Mon Sep 17 00:00:00 2001 From: Jared Casper Date: Wed, 9 Feb 2011 10:42:34 -0800 Subject: [PATCH] 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. --- .../android/apps/mytracks/io/GpxTrackWriter.java | 1 - .../google/android/apps/mytracks/io/TrackWriter.java | 3 +-- .../android/apps/mytracks/io/TrackWriterTest.java | 11 ++++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/MyTracks/src/com/google/android/apps/mytracks/io/GpxTrackWriter.java b/MyTracks/src/com/google/android/apps/mytracks/io/GpxTrackWriter.java index f1ee1c256..da342f730 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/io/GpxTrackWriter.java +++ b/MyTracks/src/com/google/android/apps/mytracks/io/GpxTrackWriter.java @@ -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("