diff --git a/app/src/main/java/net/osmtracker/gpx/ExportTrackTask.java b/app/src/main/java/net/osmtracker/gpx/ExportTrackTask.java
index b72fa621c..594c4a53e 100644
--- a/app/src/main/java/net/osmtracker/gpx/ExportTrackTask.java
+++ b/app/src/main/java/net/osmtracker/gpx/ExportTrackTask.java
@@ -342,54 +342,54 @@ private void writeTrackPoints(String trackName, Writer fw, Cursor c, boolean fil
dialogUpdateThreshold++;
}
- fw.write("\t" + "" + "\n");
- fw.write("\t\t" + "" + CDATA_START + trackName + CDATA_END + "" + "\n");
+ fw.write("" + "\n");
+ fw.write("" + CDATA_START + trackName + CDATA_END + "" + "\n");
if (fillHDOP) {
- fw.write("\t\t" + ""
+ fw.write(""
+ CDATA_START
+ context.getResources().getString(R.string.gpx_hdop_approximation_cmt)
+ CDATA_END
+ "" + "\n");
}
- fw.write("\t\t" + "" + "\n");
+ fw.write("" + "\n");
int i=0;
for(c.moveToFirst(); !c.isAfterLast(); c.moveToNext(),i++) {
StringBuffer out = new StringBuffer();
- out.append("\t\t\t" + "" + "\n");
+ + "lon=\"" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_LONGITUDE)) + "\">");
if (! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION))) {
- out.append("\t\t\t\t" + "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION)) + "" + "\n");
+ out.append("" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION)) + "");
}
- out.append("\t\t\t\t" + "" + "\n");
+ out.append("");
if(fillHDOP && ! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY))) {
- out.append("\t\t\t\t" + "" + (c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) / OSMTracker.HDOP_APPROXIMATION_FACTOR) + "" + "\n");
+ out.append("" + (c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) / OSMTracker.HDOP_APPROXIMATION_FACTOR) + "");
}
if(OSMTracker.Preferences.VAL_OUTPUT_COMPASS_COMMENT.equals(compass) && !c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- out.append("\t\t\t\t" + ""+CDATA_START+"compass: " +
+ out.append(""+CDATA_START+"compass: " +
c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))+
- "\n\t\t\t\t\tcompAccuracy: " +
+ " compAccuracy: " +
c.getLong(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY))+
- CDATA_END+""+"\n");
+ CDATA_END+"");
}
String buff = "";
if(! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_SPEED))) {
- buff += "\t\t\t\t\t" + "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_SPEED)) + "" + "\n";
+ buff += "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_SPEED)) + "";
}
if(OSMTracker.Preferences.VAL_OUTPUT_COMPASS_EXTENSION.equals(compass) && !c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- buff += "\t\t\t\t\t" + "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) + "" + "\n";
- buff += "\t\t\t\t\t" + "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + "" + "\n";
+ buff += "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) + "";
+ buff += "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + "";
}
if(! buff.equals("")) {
- out.append("\t\t\t\t" + "\n");
+ out.append("");
out.append(buff);
- out.append("\t\t\t\t" + "\n");
+ out.append("");
}
- out.append("\t\t\t" + "" + "\n");
+ out.append("" + "\n");
fw.write(out.toString());
if (i % dialogUpdateThreshold == 0) {
@@ -397,8 +397,8 @@ private void writeTrackPoints(String trackName, Writer fw, Cursor c, boolean fil
}
}
- fw.write("\t\t" + "" + "\n");
- fw.write("\t" + "" + "\n");
+ fw.write("" + "\n");
+ fw.write("" + "\n");
}
/**
@@ -426,13 +426,13 @@ private void writeWayPoints(Writer fw, Cursor c, String accuracyInfo, boolean fi
int i=0;
for(c.moveToFirst(); !c.isAfterLast(); c.moveToNext(), i++) {
StringBuffer out = new StringBuffer();
- out.append("\t" + "" + "\n");
+ + "lon=\"" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_LONGITUDE)) + "\">");
if (! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION))) {
- out.append("\t\t" + "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION)) + "" + "\n");
+ out.append("" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ELEVATION)) + "");
}
- out.append("\t\t" + "" + "\n");
+ out.append("");
String name = c.getString(c.getColumnIndex(TrackContentProvider.Schema.COL_NAME));
@@ -440,67 +440,67 @@ private void writeWayPoints(Writer fw, Cursor c, String accuracyInfo, boolean fi
// Outputs accuracy info for way point
if (OSMTracker.Preferences.VAL_OUTPUT_ACCURACY_WPT_NAME.equals(accuracyInfo)) {
// Output accuracy with name
- out.append("\t\t" + ""
+ out.append(""
+ CDATA_START
+ name
+ " (" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) + meterUnit + ")"
+ CDATA_END
- + "" + "\n");
+ + "");
if (OSMTracker.Preferences.VAL_OUTPUT_COMPASS_COMMENT.equals(compass) &&
! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- out.append("\t\t"+ "" + CDATA_START + "compass: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
- "\n\t\t\tcompass accuracy: " + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + CDATA_END + "\n");
+ out.append("" + CDATA_START + "compass: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
+ " compass accuracy: " + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + CDATA_END + "");
}
} else if (OSMTracker.Preferences.VAL_OUTPUT_ACCURACY_WPT_CMT.equals(accuracyInfo)) {
// Output accuracy in separate tag
- out.append("\t\t" + "" + CDATA_START + name + CDATA_END + "" + "\n");
+ out.append("" + CDATA_START + name + CDATA_END + "");
if (OSMTracker.Preferences.VAL_OUTPUT_COMPASS_COMMENT.equals(compass) &&
! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- out.append("\t\t" + "" + CDATA_START + accuracy + ": " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) + meterUnit +
- "\n\t\t\t compass heading: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
- "deg\n\t\t\t compass accuracy: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) +CDATA_END + "" + "\n");
+ out.append("" + CDATA_START + accuracy + ": " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) + meterUnit +
+ " compass heading: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
+ "deg compass accuracy: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) +CDATA_END + "");
} else {
- out.append("\t\t" + "" + CDATA_START + accuracy + ": " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) + meterUnit + CDATA_END + "" + "\n");
+ out.append("" + CDATA_START + accuracy + ": " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) + meterUnit + CDATA_END + "");
}
} else {
// Unknown value for accuracy info, shouldn't occur but who knows ?
// See issue #68. Output at least the name just in case.
- out.append("\t\t" + "" + CDATA_START + name + CDATA_END + "" + "\n");
+ out.append("" + CDATA_START + name + CDATA_END + "");
}
} else {
// No accuracy info requested, or available
- out.append("\t\t" + "" + CDATA_START + name + CDATA_END + "" + "\n");
+ out.append("" + CDATA_START + name + CDATA_END + "");
if (OSMTracker.Preferences.VAL_OUTPUT_COMPASS_COMMENT.equals(compass) &&
! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- out.append("\t\t"+ "" + CDATA_START + "compass: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
- "\n\t\t\tcompass accuracy: " + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + CDATA_END + "\n");
+ out.append("" + CDATA_START + "compass: " + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) +
+ " compass accuracy: " + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + CDATA_END + "");
}
}
String link = c.getString(c.getColumnIndex(TrackContentProvider.Schema.COL_LINK));
if (link != null) {
- out.append("\t\t" + "" + "\n");
- out.append("\t\t\t" + "" + link +"\n");
- out.append("\t\t" + "" + "\n");
+ out.append("");
+ out.append("" + link +"");
+ out.append("");
}
if (! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_NBSATELLITES))) {
- out.append("\t\t" + "" + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_NBSATELLITES)) + "" + "\n");
+ out.append("" + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_NBSATELLITES)) + "");
}
if(fillHDOP && ! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY))) {
- out.append("\t\t" + "" + (c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) / OSMTracker.HDOP_APPROXIMATION_FACTOR) + "" + "\n");
+ out.append("" + (c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY)) / OSMTracker.HDOP_APPROXIMATION_FACTOR) + "");
}
if (OSMTracker.Preferences.VAL_OUTPUT_COMPASS_EXTENSION.equals(compass) &&
! c.isNull(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS))) {
- out.append("\t\t\n");
- out.append("\t\t\t"+ "" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) + "\n");
- out.append("\t\t\t" + "" + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + "" + "\n");
- out.append("\t\t\n");
+ out.append("");
+ out.append("" + c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS)) + "");
+ out.append("" + c.getInt(c.getColumnIndex(TrackContentProvider.Schema.COL_COMPASS_ACCURACY)) + "");
+ out.append("");
}
- out.append("\t" + "" + "\n");
+ out.append("" + "\n");
fw.write(out.toString());