X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fsave%2FGpxExporter.java;h=584d9ba5e7ab628129d3002077bc4648f4a059ac;hb=0a2480df5845e2d7190dfdec9b2653b1609e853d;hp=1b2263bc8260d6dc49115f969de5e9c40be1ffcb;hpb=88f2c3647ed9e055090484f01a959d4581f85e7d;p=GpsPrune.git diff --git a/tim/prune/save/GpxExporter.java b/tim/prune/save/GpxExporter.java index 1b2263b..584d9ba 100644 --- a/tim/prune/save/GpxExporter.java +++ b/tim/prune/save/GpxExporter.java @@ -535,11 +535,15 @@ public class GpxExporter extends GenericFunction implements Runnable source = replaceGpxTags(source, "lat=\"", "\"", inPoint.getLatitude().output(Coordinate.FORMAT_DECIMAL_FORCE_POINT)); source = replaceGpxTags(source, "lon=\"", "\"", inPoint.getLongitude().output(Coordinate.FORMAT_DECIMAL_FORCE_POINT)); source = replaceGpxTags(source, "", "", inPoint.getAltitude().getStringValue(UnitSetLibrary.UNITS_METRES)); - source = replaceGpxTags(source, "", inPoint.getTimestamp().getText(Timestamp.FORMAT_ISO_8601)); + source = replaceGpxTags(source, "", inPoint.getTimestamp().getText(Timestamp.Format.ISO8601)); if (inPoint.isWaypoint()) { source = replaceGpxTags(source, "", "", inPoint.getWaypointName()); - source = replaceGpxTags(source, "", "", + if (source != null) + { + source = source.replaceAll("", "").replaceAll("", ""); + } + source = replaceGpxTags(source, "", "", XmlUtils.fixCdata(inPoint.getFieldValue(Field.DESCRIPTION))); } // photo / audio links @@ -685,7 +689,7 @@ public class GpxExporter extends GenericFunction implements Runnable if (inPoint.hasTimestamp() && inTimestamps) { inWriter.write("\t\t\n"); } // write waypoint name after elevation and time @@ -696,9 +700,9 @@ public class GpxExporter extends GenericFunction implements Runnable String desc = XmlUtils.fixCdata(inPoint.getFieldValue(Field.DESCRIPTION)); if (desc != null && !desc.equals("")) { - inWriter.write("\t\t"); + inWriter.write("\t\t"); inWriter.write(desc); - inWriter.write("\n"); + inWriter.write("\n"); } // Media links, if any if (inPhoto && inPoint.getPhoto() != null) @@ -757,7 +761,7 @@ public class GpxExporter extends GenericFunction implements Runnable if (inPoint.hasTimestamp() && inTimestamps) { inWriter.write("\t\t\t\t\n"); } // photo, audio