diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index 8d96630b1c..3e64bb2b12 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -1447,6 +1447,29 @@ public class GPXUtilities { ((TrkSegment) parse).points.add(wptPt); parserState.push(wptPt); } + if (parser.getName().equals("trkptsattrs")) { + String segmentPoints = readText(parser, "trkptsattrs"); + String[] pointsArr = segmentPoints.split("\n"); + for (int i = 0; i < pointsArr.length; i++) { + String[] pointAttrs = pointsArr[i].split(","); + WptPt wptPt = new WptPt(); + try { + int arrLength = pointsArr.length; + if (arrLength > 0) { + wptPt.lon = Double.parseDouble(pointAttrs[0]); + if (arrLength > 1) { + wptPt.lat = Double.parseDouble(pointAttrs[1]); + if (arrLength > 2) { + wptPt.ele = Double.parseDouble(pointAttrs[2]); + } + } + } + } catch (NumberFormatException e) { + } + ((TrkSegment) parse).points.add(wptPt); + parserState.push(wptPt); + } + } // main object to parse } else if (parse instanceof WptPt) { if (parser.getName().equals("name")) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt b/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt index 8b2677e875..00752ebace 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt +++ b/OsmAnd/src/net/osmand/plus/helpers/kml2gpx.xslt @@ -6,68 +6,69 @@ http://opensource.org/licenses/gpl-2.0.php --> - + xmlns:gx="http://www.google.com/kml/ext/2.2" + xmlns:kml="http://www.opengis.net/kml/2.2" - + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -75,66 +76,76 @@ - - + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -142,4 +153,4 @@ - \ No newline at end of file +