[OSM-dev] JOSM patch: handle <link><text>... in GPX files

Ted Mielczarek ted.mielczarek at gmail.com
Tue Oct 2 22:12:02 BST 2007


Attached is a small JOSM patch that allows for properly handling
<link> elements that contain <text> elements in imported GPX files.
This is in fact what the GpxWriter class will emit for nodes with a
"link" key, so it seems silly that the RawGpsReader can't cope with
them.  This patch just looks inside <text> elements that are children
of <link> elements, and appends their contents to the link's contents.
 It also strips whitespace from the beginning and end of the link
contents, to handle the XML content that GpxWriter writes:

This patch is necessary for me to be able to save my voice note layer
as gpx, and re-import it into JOSM.  You can see an example GPX file
(with WAV files) here:
http://ted.mielczarek.org/code/osm/voicenote-gpx.zip or

-------------- next part --------------
A non-text attachment was scrubbed...
Name: josm-rawgpsreader.patch
Type: application/octet-stream
Size: 2202 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20071002/16b8bd7c/attachment.obj>

More information about the dev mailing list