fix extensions and attributes

This commit is contained in:
vcoppe
2024-04-16 13:02:22 +02:00
parent 3dc9b7d703
commit b5eebacc02
7 changed files with 1365 additions and 1163 deletions

View File

@@ -1,11 +1,11 @@
import { XMLParser } from "fast-xml-parser";
import { XMLParser, XMLBuilder } from "fast-xml-parser";
import { GPXFile } from "./types";
export function parseGPX(gpxData: string): GPXFile {
const parser = new XMLParser({
ignoreAttributes: false,
attributeNamePrefix: "",
removeNSPrefix: true,
attributesGroupName: 'attributes',
isArray: (name: string) => {
return name === 'trk' || name === 'trkseg' || name === 'trkpt' || name === 'wpt';
},
@@ -18,7 +18,7 @@ export function parseGPX(gpxData: string): GPXFile {
transformTagName(tagName: string) {
if (tagName === 'power') {
// Transform the simple <power> tag to the more complex <gpxpx:PowerExtension> tag, the nested <gpxpx:PowerInWatts> tag is then handled by the tagValueProcessor
return 'PowerExtension';
return 'gpxpx:PowerExtension';
}
return tagName;
},
@@ -32,30 +32,69 @@ export function parseGPX(gpxData: string): GPXFile {
return new Date(tagValue);
}
if (tagName === 'hr' || tagName === 'cad' || tagName === 'atemp' || tagName === 'PowerInWatts' || tagName === 'opacity' || tagName === 'weight') {
if (tagName === 'gpxtpx:hr' || tagName === 'gpxtpx:cad' || tagName === 'gpxtpx:atemp' || tagName === 'gpxpx:PowerInWatts' || tagName === 'opacity' || tagName === 'weight') {
return parseFloat(tagValue);
}
if (tagName === 'PowerExtension') {
if (tagName === 'gpxpx:PowerExtension') {
// Finish the transformation of the simple <power> tag to the more complex <gpxpx:PowerExtension> tag
// Note that this only targets the transformed <power> tag, since it must be a leaf node
return {
'PowerInWatts': parseFloat(tagValue)
'gpxpx:PowerInWatts': parseFloat(tagValue)
};
}
}
return tagValue;
},
transformAttributeName(attributeName) {
if (attributeName !== 'lat' && attributeName !== 'lon' && attributeName !== 'creator' && attributeName !== 'href') {
return `@_${attributeName}`;
}
return attributeName;
},
});
const parsed = parser.parse(gpxData);
return parsed.gpx;
}
export function buildGPX(gpx: GPXFile): string {
const builder = new XMLBuilder({
format: true,
ignoreAttributes: false,
attributeNamePrefix: "",
attributesGroupName: 'attributes',
suppressEmptyNode: true,
tagValueProcessor: (tagName: string, tagValue: unknown): string => {
if (tagValue instanceof Date) {
return tagValue.toISOString();
}
return tagValue.toString();
},
});
gpx.attributes.creator = 'https://gpx.studio';
gpx.attributes['version'] = '1.1';
gpx.attributes['xmlns'] = 'http://www.topografix.com/GPX/1/1';
gpx.attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
gpx.attributes['xsi:schemaLocation'] = 'http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.garmin.com/xmlschemas/PowerExtension/v1 http://www.garmin.com/xmlschemas/PowerExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd';
gpx.attributes['xmlns:gpxtpx'] = 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1';
gpx.attributes['xmlns:gpxx'] = 'http://www.garmin.com/xmlschemas/GpxExtensions/v3';
gpx.attributes['xmlns:gpxpx'] = 'http://www.garmin.com/xmlschemas/PowerExtension/v1';
gpx.attributes['xmlns:gpx_style'] = 'http://www.topografix.com/GPX/gpx_style/0/2';
gpx.metadata.author = {
name: 'gpx.studio',
link: {
attributes: {
href: 'https://gpx.studio',
}
}
};
return builder.build({
"?xml": {
attributes: {
version: "1.0",
encoding: "UTF-8",
}
},
gpx
});
}

View File

@@ -1,10 +1,15 @@
export type GPXFile = {
creator: string;
attributes: GPXFileAttributes;
metadata: Metadata;
wpt: Waypoint[];
trk: Track[];
};
export type GPXFileAttributes = {
creator: string;
[key: string]: string;
};
export type Metadata = {
name?: string;
desc?: string;
@@ -14,14 +19,17 @@ export type Metadata = {
};
export type Link = {
href: string;
attributes: LinkAttributes;
text?: string;
type?: string;
};
export type LinkAttributes = {
href: string;
};
export type Waypoint = {
lat: number;
lon: number;
attributes: Coordinates;
ele?: number;
time?: Date;
name?: string;
@@ -32,6 +40,11 @@ export type Waypoint = {
type?: string;
};
export type Coordinates = {
lat: number;
lon: number;
};
export type Track = {
name?: string;
cmt?: string;
@@ -44,7 +57,7 @@ export type Track = {
};
export type TrackExtensions = {
line?: LineStyleExtension;
'gpx_style:line'?: LineStyleExtension;
};
export type LineStyleExtension = {
@@ -58,29 +71,28 @@ export type TrackSegment = {
};
export type TrackPoint = {
lat: number;
lon: number;
attributes: Coordinates;
ele?: number;
time?: Date;
extensions?: TrackPointExtensions;
};
export type TrackPointExtensions = {
TrackPointExtension?: TrackPointExtension;
PowerExtension?: PowerExtension;
'gpxtpx:TrackPointExtension'?: TrackPointExtension;
'gpxpx:PowerExtension'?: PowerExtension;
};
export type TrackPointExtension = {
hr?: number;
cad?: number;
atemp?: number;
Extensions?: {
'gpxtpx:hr'?: number;
'gpxtpx:cad'?: number;
'gpxtpx:atemp'?: number;
'gpxtpx:Extensions'?: {
surface?: string;
};
}
export type PowerExtension = {
PowerInWatts?: number;
'gpxpx:PowerInWatts'?: number;
}
export type Author = {

View File

@@ -1,256 +1,260 @@
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>simple</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>simple</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>simple</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>simple</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
</gpx>

View File

@@ -1,249 +1,253 @@
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_segments</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>with_segments</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
</trkseg>
<trkseg>
<trkpt lat="50.782212" lon="4.406377">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_segments</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>with_segments</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
</trkseg>
<trkseg>
<trkpt lat="50.782212" lon="4.406377">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
</gpx>

View File

@@ -1,336 +1,340 @@
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_time</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>with_time</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
<time>2023-12-31T23:00:00.000Z</time>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
<time>2023-12-31T23:00:03.180Z</time>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
<time>2023-12-31T23:00:11.254Z</time>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
<time>2023-12-31T23:00:14.795Z</time>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
<time>2023-12-31T23:00:17.957Z</time>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
<time>2023-12-31T23:00:21.759Z</time>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
<time>2023-12-31T23:00:29.948Z</time>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
<time>2023-12-31T23:00:36.098Z</time>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
<time>2023-12-31T23:00:42.396Z</time>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
<time>2023-12-31T23:00:45.636Z</time>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
<time>2023-12-31T23:00:48.827Z</time>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
<time>2023-12-31T23:00:55.249Z</time>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
<time>2023-12-31T23:01:00.794Z</time>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
<time>2023-12-31T23:01:03.708Z</time>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
<time>2023-12-31T23:01:06.542Z</time>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
<time>2023-12-31T23:01:11.014Z</time>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
<time>2023-12-31T23:01:14.108Z</time>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
<time>2023-12-31T23:01:17.026Z</time>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
<time>2023-12-31T23:01:19.742Z</time>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
<time>2023-12-31T23:01:28.110Z</time>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
<time>2023-12-31T23:01:31.328Z</time>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
<time>2023-12-31T23:01:35.306Z</time>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
<time>2023-12-31T23:01:36.830Z</time>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
<time>2023-12-31T23:01:38.701Z</time>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
<time>2023-12-31T23:01:40.022Z</time>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
<time>2023-12-31T23:01:41.920Z</time>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
<time>2023-12-31T23:01:48.333Z</time>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
<time>2023-12-31T23:01:52.195Z</time>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
<time>2023-12-31T23:01:55.766Z</time>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
<time>2023-12-31T23:01:58.740Z</time>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
<time>2023-12-31T23:02:04.091Z</time>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
<time>2023-12-31T23:02:12.713Z</time>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
<time>2023-12-31T23:02:14.875Z</time>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
<time>2023-12-31T23:02:16.638Z</time>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
<time>2023-12-31T23:02:18.384Z</time>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
<time>2023-12-31T23:02:25.735Z</time>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
<time>2023-12-31T23:02:27.404Z</time>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
<time>2023-12-31T23:02:29.642Z</time>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
<time>2023-12-31T23:02:31.271Z</time>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
<time>2023-12-31T23:02:32.974Z</time>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
<time>2023-12-31T23:02:34.725Z</time>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
<time>2023-12-31T23:02:36.057Z</time>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
<time>2023-12-31T23:02:37.639Z</time>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
<time>2023-12-31T23:02:39.280Z</time>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
<time>2023-12-31T23:02:41.205Z</time>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
<time>2023-12-31T23:02:43.731Z</time>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
<time>2023-12-31T23:02:54.830Z</time>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
<time>2023-12-31T23:02:59.232Z</time>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
<time>2023-12-31T23:03:01.951Z</time>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
<time>2023-12-31T23:03:03.598Z</time>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
<time>2023-12-31T23:03:05.119Z</time>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
<time>2023-12-31T23:03:07.291Z</time>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
<time>2023-12-31T23:03:11.741Z</time>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
<time>2023-12-31T23:03:17.114Z</time>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
<time>2023-12-31T23:03:28.573Z</time>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
<time>2023-12-31T23:03:32.796Z</time>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
<time>2023-12-31T23:03:38.750Z</time>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
<time>2023-12-31T23:03:41.922Z</time>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
<time>2023-12-31T23:03:45.133Z</time>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
<time>2023-12-31T23:03:48.867Z</time>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
<time>2023-12-31T23:03:56.536Z</time>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
<time>2023-12-31T23:04:00.561Z</time>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
<time>2023-12-31T23:04:03.346Z</time>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
<time>2023-12-31T23:04:06.761Z</time>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
<time>2023-12-31T23:04:14.339Z</time>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
<time>2023-12-31T23:04:23.699Z</time>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
<time>2023-12-31T23:04:27.973Z</time>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
<time>2023-12-31T23:04:32.307Z</time>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
<time>2023-12-31T23:04:44.408Z</time>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
<time>2023-12-31T23:04:48.146Z</time>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
<time>2023-12-31T23:05:00.532Z</time>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
<time>2023-12-31T23:05:11.852Z</time>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
<time>2023-12-31T23:05:23.300Z</time>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
<time>2023-12-31T23:05:41.944Z</time>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
<time>2023-12-31T23:05:49.538Z</time>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
<time>2023-12-31T23:05:57.109Z</time>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
<time>2023-12-31T23:06:03.116Z</time>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
<time>2023-12-31T23:06:14.336Z</time>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
<time>2023-12-31T23:06:26.353Z</time>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
<time>2023-12-31T23:06:40.567Z</time>
</trkpt>
</trkseg>
</trk>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_time</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<trk>
<name>with_time</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
<time>2023-12-31T23:00:00.000Z</time>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
<time>2023-12-31T23:00:03.180Z</time>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
<time>2023-12-31T23:00:11.254Z</time>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
<time>2023-12-31T23:00:14.795Z</time>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
<time>2023-12-31T23:00:17.957Z</time>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
<time>2023-12-31T23:00:21.759Z</time>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
<time>2023-12-31T23:00:29.948Z</time>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
<time>2023-12-31T23:00:36.098Z</time>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
<time>2023-12-31T23:00:42.396Z</time>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
<time>2023-12-31T23:00:45.636Z</time>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
<time>2023-12-31T23:00:48.827Z</time>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
<time>2023-12-31T23:00:55.249Z</time>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
<time>2023-12-31T23:01:00.794Z</time>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
<time>2023-12-31T23:01:03.708Z</time>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
<time>2023-12-31T23:01:06.542Z</time>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
<time>2023-12-31T23:01:11.014Z</time>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
<time>2023-12-31T23:01:14.108Z</time>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
<time>2023-12-31T23:01:17.026Z</time>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
<time>2023-12-31T23:01:19.742Z</time>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
<time>2023-12-31T23:01:28.110Z</time>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
<time>2023-12-31T23:01:31.328Z</time>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
<time>2023-12-31T23:01:35.306Z</time>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
<time>2023-12-31T23:01:36.830Z</time>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
<time>2023-12-31T23:01:38.701Z</time>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
<time>2023-12-31T23:01:40.022Z</time>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
<time>2023-12-31T23:01:41.920Z</time>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
<time>2023-12-31T23:01:48.333Z</time>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
<time>2023-12-31T23:01:52.195Z</time>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
<time>2023-12-31T23:01:55.766Z</time>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
<time>2023-12-31T23:01:58.740Z</time>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
<time>2023-12-31T23:02:04.091Z</time>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
<time>2023-12-31T23:02:12.713Z</time>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
<time>2023-12-31T23:02:14.875Z</time>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
<time>2023-12-31T23:02:16.638Z</time>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
<time>2023-12-31T23:02:18.384Z</time>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
<time>2023-12-31T23:02:25.735Z</time>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
<time>2023-12-31T23:02:27.404Z</time>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
<time>2023-12-31T23:02:29.642Z</time>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
<time>2023-12-31T23:02:31.271Z</time>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
<time>2023-12-31T23:02:32.974Z</time>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
<time>2023-12-31T23:02:34.725Z</time>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
<time>2023-12-31T23:02:36.057Z</time>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
<time>2023-12-31T23:02:37.639Z</time>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
<time>2023-12-31T23:02:39.280Z</time>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
<time>2023-12-31T23:02:41.205Z</time>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
<time>2023-12-31T23:02:43.731Z</time>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
<time>2023-12-31T23:02:54.830Z</time>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
<time>2023-12-31T23:02:59.232Z</time>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
<time>2023-12-31T23:03:01.951Z</time>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
<time>2023-12-31T23:03:03.598Z</time>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
<time>2023-12-31T23:03:05.119Z</time>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
<time>2023-12-31T23:03:07.291Z</time>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
<time>2023-12-31T23:03:11.741Z</time>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
<time>2023-12-31T23:03:17.114Z</time>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
<time>2023-12-31T23:03:28.573Z</time>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
<time>2023-12-31T23:03:32.796Z</time>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
<time>2023-12-31T23:03:38.750Z</time>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
<time>2023-12-31T23:03:41.922Z</time>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
<time>2023-12-31T23:03:45.133Z</time>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
<time>2023-12-31T23:03:48.867Z</time>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
<time>2023-12-31T23:03:56.536Z</time>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
<time>2023-12-31T23:04:00.561Z</time>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
<time>2023-12-31T23:04:03.346Z</time>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
<time>2023-12-31T23:04:06.761Z</time>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
<time>2023-12-31T23:04:14.339Z</time>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
<time>2023-12-31T23:04:23.699Z</time>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
<time>2023-12-31T23:04:27.973Z</time>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
<time>2023-12-31T23:04:32.307Z</time>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
<time>2023-12-31T23:04:44.408Z</time>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
<time>2023-12-31T23:04:48.146Z</time>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
<time>2023-12-31T23:05:00.532Z</time>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
<time>2023-12-31T23:05:11.852Z</time>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
<time>2023-12-31T23:05:23.300Z</time>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
<time>2023-12-31T23:05:41.944Z</time>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
<time>2023-12-31T23:05:49.538Z</time>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
<time>2023-12-31T23:05:57.109Z</time>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
<time>2023-12-31T23:06:03.116Z</time>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
<time>2023-12-31T23:06:14.336Z</time>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
<time>2023-12-31T23:06:26.353Z</time>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
<time>2023-12-31T23:06:40.567Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>

View File

@@ -1,263 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_waypoint</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<wpt lat="50.7836710064975" lon="4.410764082658738">
<ele>122.0</ele>
<name>Waypoint</name>
<cmt>Comment</cmt>
<desc>Description</desc>
<sym>Bike Trail</sym>
</wpt>
<trk>
<name>with_waypoint</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"
xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2" version="1.1" creator="https://gpx.studio">
<metadata>
<name>with_waypoint</name>
<author>
<name>gpx.studio</name>
<link href="https://gpx.studio"></link>
</author>
</metadata>
<wpt lat="50.7836710064975" lon="4.410764082658738">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
<name>Waypoint</name>
<cmt>Comment</cmt>
<desc>Description</desc>
<sym>Bike Trail</sym>
</wpt>
<trk>
<name>with_waypoint</name>
<type>Cycling</type>
<trkseg>
<trkpt lat="50.790867" lon="4.404968">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.790714" lon="4.405036">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.790336" lon="4.405259">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.790165" lon="4.405331">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.790008" lon="4.405359">
<ele>110.3</ele>
</trkpt>
<trkpt lat="50.789818" lon="4.405359">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.789409" lon="4.40534">
<ele>107.0</ele>
</trkpt>
<trkpt lat="50.789105" lon="4.405411">
<ele>106.0</ele>
</trkpt>
<trkpt lat="50.788799" lon="4.405527">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.788645" lon="4.405606">
<ele>109.8</ele>
</trkpt>
<trkpt lat="50.7885" lon="4.405711">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.78822" lon="4.405959">
<ele>112.0</ele>
</trkpt>
<trkpt lat="50.787956" lon="4.406092">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.787814" lon="4.406143">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.787674" lon="4.406177">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787451" lon="4.406199">
<ele>115.3</ele>
</trkpt>
<trkpt lat="50.787297" lon="4.406177">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.78716" lon="4.406098">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.787045" lon="4.405984">
<ele>114.3</ele>
</trkpt>
<trkpt lat="50.786683" lon="4.405653">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.786538" lon="4.405543">
<ele>115.0</ele>
</trkpt>
<trkpt lat="50.78635" lon="4.405441">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786275" lon="4.40542">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786182" lon="4.405435">
<ele>116.0</ele>
</trkpt>
<trkpt lat="50.786121" lon="4.405475">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.786042" lon="4.405558">
<ele>115.5</ele>
</trkpt>
<trkpt lat="50.785821" lon="4.405925">
<ele>114.5</ele>
</trkpt>
<trkpt lat="50.785672" lon="4.406119">
<ele>112.5</ele>
</trkpt>
<trkpt lat="50.785516" lon="4.406256">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.785384" lon="4.406364">
<ele>109.0</ele>
</trkpt>
<trkpt lat="50.785126" lon="4.406475">
<ele>106.3</ele>
</trkpt>
<trkpt lat="50.784697" lon="4.406537">
<ele>104.3</ele>
</trkpt>
<trkpt lat="50.784591" lon="4.40657">
<ele>104.0</ele>
</trkpt>
<trkpt lat="50.784507" lon="4.406612">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784435" lon="4.40669">
<ele>103.3</ele>
</trkpt>
<trkpt lat="50.784209" lon="4.407148">
<ele>103.5</ele>
</trkpt>
<trkpt lat="50.784162" lon="4.407257">
<ele>103.8</ele>
</trkpt>
<trkpt lat="50.784077" lon="4.407372">
<ele>104.8</ele>
</trkpt>
<trkpt lat="50.784006" lon="4.407435">
<ele>105.8</ele>
</trkpt>
<trkpt lat="50.783924" lon="4.407471">
<ele>106.8</ele>
</trkpt>
<trkpt lat="50.783837" lon="4.407486">
<ele>107.8</ele>
</trkpt>
<trkpt lat="50.783771" lon="4.407472">
<ele>108.5</ele>
</trkpt>
<trkpt lat="50.783697" lon="4.407428">
<ele>109.3</ele>
</trkpt>
<trkpt lat="50.783626" lon="4.407363">
<ele>110.0</ele>
</trkpt>
<trkpt lat="50.783548" lon="4.407274">
<ele>110.5</ele>
</trkpt>
<trkpt lat="50.783458" lon="4.407134">
<ele>110.8</ele>
</trkpt>
<trkpt lat="50.783123" lon="4.406435">
<ele>111.8</ele>
</trkpt>
<trkpt lat="50.782982" lon="4.406168">
<ele>112.8</ele>
</trkpt>
<trkpt lat="50.782871" lon="4.406044">
<ele>113.3</ele>
</trkpt>
<trkpt lat="50.78279" lon="4.406021">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782714" lon="4.406018">
<ele>113.5</ele>
</trkpt>
<trkpt lat="50.782607" lon="4.406047">
<ele>113.8</ele>
</trkpt>
<trkpt lat="50.782405" lon="4.406194">
<ele>114.8</ele>
</trkpt>
<trkpt lat="50.782175" lon="4.406413">
<ele>115.8</ele>
</trkpt>
<trkpt lat="50.781749" lon="4.407018">
<ele>118.5</ele>
</trkpt>
<trkpt lat="50.781654" lon="4.407316">
<ele>119.5</ele>
</trkpt>
<trkpt lat="50.781563" lon="4.407764">
<ele>121.3</ele>
</trkpt>
<trkpt lat="50.781487" lon="4.407984">
<ele>122.0</ele>
</trkpt>
<trkpt lat="50.781422" lon="4.408216">
<ele>122.8</ele>
</trkpt>
<trkpt lat="50.781395" lon="4.408508">
<ele>123.5</ele>
</trkpt>
<trkpt lat="50.781399" lon="4.409114">
<ele>126.3</ele>
</trkpt>
<trkpt lat="50.781367" lon="4.409428">
<ele>128.0</ele>
</trkpt>
<trkpt lat="50.781286" lon="4.409607">
<ele>129.0</ele>
</trkpt>
<trkpt lat="50.78116" lon="4.409789">
<ele>130.0</ele>
</trkpt>
<trkpt lat="50.780804" lon="4.409993">
<ele>130.8</ele>
</trkpt>
<trkpt lat="50.780389" lon="4.410334">
<ele>131.8</ele>
</trkpt>
<trkpt lat="50.780232" lon="4.410563">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.780094" lon="4.410827">
<ele>132.8</ele>
</trkpt>
<trkpt lat="50.779723" lon="4.411582">
<ele>135.8</ele>
</trkpt>
<trkpt lat="50.779591" lon="4.411791">
<ele>135.5</ele>
</trkpt>
<trkpt lat="50.779125" lon="4.412435">
<ele>132.5</ele>
</trkpt>
<trkpt lat="50.778676" lon="4.412979">
<ele>134.0</ele>
</trkpt>
<trkpt lat="50.778194" lon="4.413466">
<ele>136.8</ele>
</trkpt>
<trkpt lat="50.777427" lon="4.414302">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.777165" lon="4.414736">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776927" lon="4.415201">
<ele>137.5</ele>
</trkpt>
<trkpt lat="50.776778" lon="4.415613">
<ele>137.3</ele>
</trkpt>
<trkpt lat="50.776553" lon="4.416425">
<ele>134.8</ele>
</trkpt>
<trkpt lat="50.776326" lon="4.417304">
<ele>132.3</ele>
</trkpt>
<trkpt lat="50.776129" lon="4.418383">
<ele>129.5</ele>
</trkpt>
</trkseg>
</trk>
</gpx>

View File

@@ -1,17 +1,17 @@
import * as fs from 'fs';
import { parseGPX } from '../src/io';
import { parseGPX, buildGPX } from '../src/io';
describe("Parsing tests", () => {
describe("Parsing", () => {
it("Simple", () => {
const path = "test-data/simple.gpx";
const data = fs.readFileSync(path, 'utf8');
const result = parseGPX(data);
expect(result.creator).toBe("https://gpx.studio");
expect(result.attributes.creator).toBe("https://gpx.studio");
expect(result.metadata.name).toBe("simple");
expect(result.metadata.author.name).toBe("gpx.studio");
expect(result.metadata.author.link.href).toBe("https://gpx.studio");
expect(result.metadata.author.link.attributes.href).toBe("https://gpx.studio");
expect(result.trk.length).toBe(1);
@@ -25,13 +25,14 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
const point = segment.trkpt[i];
expect(point).toHaveProperty('lat');
expect(point).toHaveProperty('lon');
expect(point).toHaveProperty('attributes');
expect(point.attributes).toHaveProperty('lat');
expect(point.attributes).toHaveProperty('lon');
expect(point).toHaveProperty('ele');
}
expect(segment.trkpt[0].lat).toBe(50.790867);
expect(segment.trkpt[0].lon).toBe(4.404968);
expect(segment.trkpt[0].attributes.lat).toBe(50.790867);
expect(segment.trkpt[0].attributes.lon).toBe(4.404968);
expect(segment.trkpt[0].ele).toBe(109.0);
});
@@ -74,8 +75,8 @@ describe("Parsing tests", () => {
expect(result.wpt.length).toBe(1);
const waypoint = result.wpt[0];
expect(waypoint.lat).toBe(50.7836710064975);
expect(waypoint.lon).toBe(4.410764082658738);
expect(waypoint.attributes.lat).toBe(50.7836710064975);
expect(waypoint.attributes.lon).toBe(4.410764082658738);
expect(waypoint.ele).toBe(122.0);
expect(waypoint.name).toBe("Waypoint");
expect(waypoint.cmt).toBe("Comment");
@@ -109,12 +110,12 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('TrackPointExtension');
expect(segment.trkpt[i].extensions.TrackPointExtension).toHaveProperty('hr');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxtpx:TrackPointExtension');
expect(segment.trkpt[i].extensions['gpxtpx:TrackPointExtension']).toHaveProperty('gpxtpx:hr');
}
expect(segment.trkpt[0].extensions.TrackPointExtension.hr).toBe(150);
expect(segment.trkpt[segment.trkpt.length - 1].extensions.TrackPointExtension.hr).toBe(160);
expect(segment.trkpt[0].extensions['gpxtpx:TrackPointExtension']['gpxtpx:hr']).toBe(150);
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxtpx:TrackPointExtension']['gpxtpx:hr']).toBe(160);
});
it("Cadence", () => {
@@ -127,12 +128,12 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('TrackPointExtension');
expect(segment.trkpt[i].extensions.TrackPointExtension).toHaveProperty('cad');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxtpx:TrackPointExtension');
expect(segment.trkpt[i].extensions['gpxtpx:TrackPointExtension']).toHaveProperty('gpxtpx:cad');
}
expect(segment.trkpt[0].extensions.TrackPointExtension.cad).toBe(80);
expect(segment.trkpt[segment.trkpt.length - 1].extensions.TrackPointExtension.cad).toBe(90);
expect(segment.trkpt[0].extensions['gpxtpx:TrackPointExtension']['gpxtpx:cad']).toBe(80);
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxtpx:TrackPointExtension']['gpxtpx:cad']).toBe(90);
});
it("Temperature", () => {
@@ -145,12 +146,12 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('TrackPointExtension');
expect(segment.trkpt[i].extensions.TrackPointExtension).toHaveProperty('atemp');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxtpx:TrackPointExtension');
expect(segment.trkpt[i].extensions['gpxtpx:TrackPointExtension']).toHaveProperty('gpxtpx:atemp');
}
expect(segment.trkpt[0].extensions.TrackPointExtension.atemp).toBe(21);
expect(segment.trkpt[segment.trkpt.length - 1].extensions.TrackPointExtension.atemp).toBe(22);
expect(segment.trkpt[0].extensions['gpxtpx:TrackPointExtension']['gpxtpx:atemp']).toBe(21);
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxtpx:TrackPointExtension']['gpxtpx:atemp']).toBe(22);
});
it("Power 1", () => {
@@ -163,12 +164,12 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('PowerExtension');
expect(segment.trkpt[i].extensions.PowerExtension).toHaveProperty('PowerInWatts');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxpx:PowerExtension');
expect(segment.trkpt[i].extensions['gpxpx:PowerExtension']).toHaveProperty('gpxpx:PowerInWatts');
}
expect(segment.trkpt[0].extensions.PowerExtension.PowerInWatts).toBe(200);
expect(segment.trkpt[segment.trkpt.length - 1].extensions.PowerExtension.PowerInWatts).toBe(210);
expect(segment.trkpt[0].extensions['gpxpx:PowerExtension']['gpxpx:PowerInWatts']).toBe(200);
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxpx:PowerExtension']['gpxpx:PowerInWatts']).toBe(210);
});
it("Power 2", () => {
@@ -181,12 +182,12 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('PowerExtension');
expect(segment.trkpt[i].extensions.PowerExtension).toHaveProperty('PowerInWatts');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxpx:PowerExtension');
expect(segment.trkpt[i].extensions['gpxpx:PowerExtension']).toHaveProperty('gpxpx:PowerInWatts');
}
expect(segment.trkpt[0].extensions.PowerExtension.PowerInWatts).toBe(200);
expect(segment.trkpt[segment.trkpt.length - 1].extensions.PowerExtension.PowerInWatts).toBe(210);
expect(segment.trkpt[0].extensions['gpxpx:PowerExtension']['gpxpx:PowerInWatts']).toBe(200);
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxpx:PowerExtension']['gpxpx:PowerInWatts']).toBe(210);
});
it("Surface", () => {
@@ -199,13 +200,13 @@ describe("Parsing tests", () => {
for (let i = 0; i < segment.trkpt.length; i++) {
expect(segment.trkpt[i]).toHaveProperty('extensions');
expect(segment.trkpt[i].extensions).toHaveProperty('TrackPointExtension');
expect(segment.trkpt[i].extensions.TrackPointExtension).toHaveProperty('Extensions');
expect(segment.trkpt[i].extensions.TrackPointExtension.Extensions).toHaveProperty('surface');
expect(segment.trkpt[i].extensions).toHaveProperty('gpxtpx:TrackPointExtension');
expect(segment.trkpt[i].extensions['gpxtpx:TrackPointExtension']).toHaveProperty('gpxtpx:Extensions');
expect(segment.trkpt[i].extensions['gpxtpx:TrackPointExtension']['gpxtpx:Extensions']).toHaveProperty('surface');
}
expect(segment.trkpt[0].extensions.TrackPointExtension.Extensions.surface).toBe("asphalt");
expect(segment.trkpt[segment.trkpt.length - 1].extensions.TrackPointExtension.Extensions.surface).toBe("cobblestone");
expect(segment.trkpt[0].extensions['gpxtpx:TrackPointExtension']['gpxtpx:Extensions'].surface).toBe("asphalt");
expect(segment.trkpt[segment.trkpt.length - 1].extensions['gpxtpx:TrackPointExtension']['gpxtpx:Extensions'].surface).toBe("cobblestone");
});
it("Track style", () => {
@@ -216,14 +217,148 @@ describe("Parsing tests", () => {
const track = result.trk[0];
expect(track).toHaveProperty('extensions');
expect(track.extensions).toHaveProperty('line');
expect(track.extensions).toHaveProperty('gpx_style:line');
expect(track.extensions.line).toHaveProperty('color');
expect(track.extensions.line).toHaveProperty('opacity');
expect(track.extensions.line).toHaveProperty('weight');
expect(track.extensions['gpx_style:line']).toHaveProperty('color');
expect(track.extensions['gpx_style:line']).toHaveProperty('opacity');
expect(track.extensions['gpx_style:line']).toHaveProperty('weight');
expect(track.extensions.line.color).toBe("2d3ee9");
expect(track.extensions.line.opacity).toBe(0.5);
expect(track.extensions.line.weight).toBe(5);
expect(track.extensions['gpx_style:line'].color).toBe("2d3ee9");
expect(track.extensions['gpx_style:line'].opacity).toBe(0.5);
expect(track.extensions['gpx_style:line'].weight).toBe(5);
});
});
describe("Building", () => {
it("Simple", () => {
const path = "test-data/simple.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Multiple tracks", () => {
const path = "test-data/with_tracks.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Multiple segments", () => {
const path = "test-data/with_segments.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Waypoint", () => {
const path = "test-data/with_waypoint.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Time", () => {
const path = "test-data/with_time.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Heart rate", () => {
const path = "test-data/with_hr.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Cadence", () => {
const path = "test-data/with_cad.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Temperature", () => {
const path = "test-data/with_temp.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Power 1", () => {
const path = "test-data/with_power_1.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Power 2", () => {
const path = "test-data/with_power_2.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Surface", () => {
const path = "test-data/with_surface.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
it("Track style", () => {
const path = "test-data/with_style.gpx";
const data = fs.readFileSync(path, 'utf8');
const original = parseGPX(data);
const built = buildGPX(original);
const rebuilt = parseGPX(built);
expect(rebuilt).toEqual(original);
});
});