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
@@ -267,8 +267,13 @@ public class TrackWriterTest extends AndroidTestCase {
wpt.setId(i + 1);
}
// Begin the track
formatWriter.writeHeader();
// Expect reading/writing of the waypoints (except the first)
formatWriter.writeWaypoint(wptEq(wps[1]));
formatWriter.writeWaypoint(wptEq(wps[2]));
// Begin the track
formatWriter.writeBeginTrack(locEq(locs[0]));
// Write locations 1-2
@@ -289,10 +294,6 @@ public class TrackWriterTest extends AndroidTestCase {
// End the track
formatWriter.writeEndTrack(locEq(locs[5]));
// Expect reading/writing of the waypoints (except the first)
formatWriter.writeWaypoint(wptEq(wps[1]));
formatWriter.writeWaypoint(wptEq(wps[2]));
formatWriter.writeFooter();
formatWriter.close();