Der API-Aufruf 'GPXAnalyzeRequest' analysiert eine hochgeladene GPX-Datei und liefert detaillierte Metriken zu den enthaltenen Tracks, Segmenten und einzelnen Punkten. Die Antwort enthält neben den Analysedaten auch die ursprüngliche GPX-Datei (Base64-kodiert).
Attribut | Subattribut | Datentyp | Beschreibung |
---|---|---|---|
Type | string | Typ der Anfrage (GPXAnalyzeRequest) | |
ID | string | ID der Anfrage | |
Attributes | struct | Attribute der Anfrage | |
GPXData | string | GPX-Datei (Base64-Kodierung) |
Attribut | Subattribut | Subattribut | Subattribut | Subattribut | Subattribut | Datentyp | Beschreibung |
---|---|---|---|---|---|---|---|
Type | string | Typ der Antwort (GPXAnalyzeResponse) | |||||
ID | string | ID der Antwort | |||||
Attributes | struct | Attribute der Antwort | |||||
GPXData | string | Ursprüngliche GPX-Datei (Base64-Kodierung) | |||||
GpxAnalyzeResult | struct | Struktur mit den Analyseergebnissen der GPX-Datei | |||||
Version | string | GPX-Version | |||||
Name | string | Name der GPX-Datei/Route/Track | |||||
Description | string | Beschreibung der GPX-Datei/Route/Track | |||||
Creator | string | Ersteller der GPX-Datei | |||||
Time | string | Zeitstempel der GPX-Datei (ISO 8601) | |||||
TotalPoints | int | Gesamtzahl der Punkte in der GPX-Datei | |||||
Tracks | []struct | Array von Track-Objekten | |||||
Name | string | Name des Tracks | |||||
Comment | string | Kommentar zum Track | |||||
Description | string | Beschreibung des Tracks | |||||
Source | string | Quelle des Tracks | |||||
Type | string | Typ des Tracks | |||||
Segments | []struct | Array von Segment-Objekten innerhalb des Tracks | |||||
StartTime | string | Startzeit des Segments (ISO 8601) | |||||
EndTime | string | Endzeit des Segments (ISO 8601) | |||||
Duration | int | Gesamtdauer des Segments in Sekunden | |||||
Points | int | Anzahl der Punkte im Segment | |||||
Length2D | float | 2D-Länge des Segments in Metern | |||||
Length3D | float | 3D-Länge des Segments in Metern (unter Berücksichtigung der Höhe) | |||||
MovingTime | int | Zeit in Bewegung in Sekunden | |||||
StoppedTime | int | Zeit ohne Bewegung in Sekunden | |||||
MovingDistance | float | Distanz in Bewegung in Metern | |||||
StoppedDistance | float | Distanz ohne Bewegung in Metern (oft 0 oder sehr klein) | |||||
MaxLatitude | float | Maximale Breitengrad im Segment | |||||
MaxLongitude | float | Maximale Längengrad im Segment | |||||
MinLatitude | float | Minimale Breitengrad im Segment | |||||
MinLongitude | float | Minimale Längengrad im Segment | |||||
UphillWMA | float | Kumulierter Anstieg unter Verwendung des Weighted Moving Average-Algorithmus | |||||
DownhillWMA | float | Kumulierter Abstieg unter Verwendung des Weighted Moving Average-Algorithmus | |||||
UphillUnfiltered | float | Kumulierter Anstieg (Rohdaten) | |||||
DownhillUnfiltered | float | Kumulierter Abstieg (Rohdaten) | |||||
PointDetails | []struct | Array von detaillierten Informationen zu einzelnen Punkten | |||||
Timestamp | string | Zeitstempel des Punktes (ISO 8601) | |||||
TimeDifference | int | Zeitunterschied zum vorherigen Punkt in Sekunden | |||||
Latitude | float | Breitengrad des Punktes | |||||
Longitude | float | Längengrad des Punktes | |||||
Distance | float | Distanz zum vorherigen Punkt in Metern | |||||
Elevation | float | Höhe des Punktes in Metern | |||||
CumulativeUphill | float | Kumulierter Anstieg bis zu diesem Punkt | |||||
CumulativeDownhill | float | Kumulierter Abstieg bis zu diesem Punkt | |||||
IsError | bool | Fehler (ja/nein) | |||||
Error | struct | Fehlerdetails | |||||
Code | string | Fehlernummer | |||||
Title | string | Fehlerbeschreibung | |||||
Detail | string | Fehlerdetaillierung |
#!/bin/bash
#
# Analyse der Höhendaten für alle Punkte einer GPX-Datei
gpxdata=$(cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1">
<trk>
<name>Ahornweg-Bad-Iburg</name>
<trkseg>
<trkpt lat="52.15532" lon="8.0607952">
<ele>142.7689971923828</ele>
<time>2024-06-28T07:24:09Z</time>
</trkpt>
<trkpt lat="52.1553277" lon="8.0608346">
<ele>154.16900634765625</ele>
<time>2024-06-28T07:24:19Z</time>
</trkpt>
<trkpt lat="52.1553271" lon="8.0609262">
<ele>153.83700561523438</ele>
<time>2024-06-28T07:24:29Z</time>
</trkpt>
<trkpt lat="52.155319" lon="8.0610889">
<ele>162.6750030517578</ele>
<time>2024-06-28T07:24:39Z</time>
</trkpt>
<trkpt lat="52.1553107" lon="8.0612431">
<ele>162.12899780273438</ele>
<time>2024-06-28T07:24:49Z</time>
</trkpt>
<trkpt lat="52.1553158" lon="8.0613957">
<ele>164.51400756835938</ele>
<time>2024-06-28T07:24:59Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
EOF
)
gpxdataBase64=$(base64 -w 0 <<< "$gpxdata")
postdata=$(cat <<EOF
{
"Type": "GPXAnalyzeRequest",
"ID": "Ahornweg-Bad-Iburg.gpx",
"Attributes": {
"GPXData": "$gpxdataBase64"
}
}
EOF
)
echo "postdata =\n$postdata"
curl \
--silent \
--include \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "$postdata" \
https://api.hoehendaten.de:14444/v1/gpxanalyze
HTTP/2 200
access-control-allow-headers: Content-Type
access-control-allow-methods: POST
access-control-allow-origin: *
content-type: application/json; charset=utf-8
date: Sat, 12 Jul 2025 12:37:51 GMT
{
"Type": "GPXAnalyzeResponse",
"ID": "Ahornweg-Bad-Iburg.gpx",
"Attributes": {
"GPXData": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGlu ... DwvdHJrc2VnPjogICAgPC90cms+CjwvZ3B4Pgo=",
"GpxAnalyzeResult": {
"Version": "1.1",
"Name": "",
"Description": "",
"Creator": "",
"Time": null,
"TotalPoints": 6,
"Tracks": [
{
"Name": "Ahornweg-Bad-Iburg",
"Comment": "",
"Description": "",
"Source": "",
"Type": "",
"Segments": [
{
"StartTime": "2024-06-28T07:24:09Z",
"EndTime": "2024-06-28T07:24:59Z",
"Duration": 50,
"Points": 6,
"Length2D": 41.16449954193156,
"Length3D": 53.46380403166227,
"MovingTime": 50,
"StoppedTime": 0,
"MovingDistance": 53.46380403166227,
"StoppedDistance": 0,
"MaxLatitude": 52.1553277,
"MaxLongitude": 8.0613957,
"MinLatitude": 52.1553107,
"MinLongitude": 8.0607952,
"UphillWMA": 21.745010375976562,
"DownhillWMA": 0,
"UphillUnfiltered": 22.623016357421875,
"DownhillUnfiltered": 0.8780059814453125,
"PointDetails": [
{
"Timestamp": "2024-06-28T07:24:09Z",
"TimeDifference": 0,
"Latitude": 52.15532,
"Longitude": 8.0607952,
"Distance": 0,
"Elevation": 142.7689971923828,
"CumulativeUphill": 0,
"CumulativeDownhill": 0
},
{
"Timestamp": "2024-06-28T07:24:19Z",
"TimeDifference": 10,
"Latitude": 52.1553277,
"Longitude": 8.0608346,
"Distance": 2.8190652003863166,
"Elevation": 154.16900634765625,
"CumulativeUphill": 11.400009155273438,
"CumulativeDownhill": 0
},
{
"Timestamp": "2024-06-28T07:24:29Z",
"TimeDifference": 10,
"Latitude": 52.1553271,
"Longitude": 8.0609262,
"Distance": 6.245155614033292,
"Elevation": 153.83700561523438,
"CumulativeUphill": 11.400009155273438,
"CumulativeDownhill": 0.332000732421875
},
{
"Timestamp": "2024-06-28T07:24:39Z",
"TimeDifference": 10,
"Latitude": 52.155319,
"Longitude": 8.0610889,
"Distance": 11.12847938455032,
"Elevation": 162.6750030517578,
"CumulativeUphill": 20.238006591796875,
"CumulativeDownhill": 0.332000732421875
},
{
"Timestamp": "2024-06-28T07:24:49Z",
"TimeDifference": 10,
"Latitude": 52.1553107,
"Longitude": 8.0612431,
"Distance": 10.552918214471484,
"Elevation": 162.12899780273438,
"CumulativeUphill": 20.238006591796875,
"CumulativeDownhill": 0.8780059814453125
},
{
"Timestamp": "2024-06-28T07:24:59Z",
"TimeDifference": 10,
"Latitude": 52.1553158,
"Longitude": 8.0613957,
"Distance": 10.418881128490147,
"Elevation": 164.51400756835938,
"CumulativeUphill": 22.623016357421875,
"CumulativeDownhill": 0.8780059814453125
}
]
}
]
}
]
},
"IsError": false,
"Error": {
"Code": "",
"Title": "",
"Detail": ""
}
}
}
© 2025 - Höhendaten für Deutschland