Application Programming Interface (API)
Basisinformationen
Zweck |
Basis-URL |
Abfrage von genauen Höheninformationen |
https://api.hoehendaten.de:14444 |
API-Aufrufe
Methode |
Typ |
Beschreibung |
Aufruf-URL |
POST |
PointRequest |
Abfrage der Höheninformation zu einem lon/lat Punkt |
/v1/point |
OPTIONS |
PointRequest |
Abfrage der Request-Eigenschaften (CORS) |
/v1/point |
POST |
UTMPointRequest |
Abfrage der Höheninformation zu einem UTM Punkt |
/v1/utmpoint |
OPTIONS |
UTMPointRequest |
Abfrage der Request-Eigenschaften (CORS) |
/v1/utmpoint |
POST |
GPXRequest |
Abfragen der Höheninformationen zu allen Punkten einer GPX-Datei |
/v1/gpx |
OPTIONS |
GPXRequest |
Abfrage der Request-Eigenschaften (CORS) |
/v1/gpx |
API-Attribute 'PointRequest'
Attribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
string |
Typ der Anfrage (PointRequest) |
ID |
|
string |
ID der Anfrage |
Attributes |
|
struct |
Attribute der Anfrage |
|
Longitude |
float |
Längengrad (Dezimalgrad) |
|
Latitude |
float |
Breitengrad (Dezimalgrad) |
API-Attribute 'PointResponse'
Attribut |
Subattribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
|
string |
Typ der Antwort (PointResponse) |
ID |
|
|
string |
ID der Antwort |
Attributes |
|
|
struct |
Attribute der Antwort |
|
Longitude |
|
float |
Längengrad (Dezimalgrad) |
|
Latitude |
|
float |
Breitengrad (Dezimalgrad) |
|
Elevation |
|
float |
Höhenwert (Meter) |
|
Actuality |
|
string |
Aktualität der Daten |
|
Attribution |
|
string |
Attribution der Daten |
|
TileIndex |
|
string |
Index der Quelldaten |
|
IsError |
|
bool |
Fehler (ja/nein) |
|
Error |
|
struct |
Fehlerdetails |
|
|
Code |
string |
Fehlernummer |
|
|
Title |
string |
Fehlerbeschreibung |
|
|
Details |
string |
Fehlerdetaillierung |
PointRequest (Beispiel)
#!/bin/bash
#
# Abfrage der Höhendaten für einen lon/lat Punkt
postdata=$(cat <<EOF
{
"Type": "PointRequest",
"ID": "Langenberg (Rothaargebirge, höchster Berg in NRW)",
"Attributes": {
"Longitude": 8.558333,
"Latitude": 51.276389
}
}
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/point
PointResponse:
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
content-length: 446
date: Tue, 22 Apr 2025 07:36:14 GMT
{
"Type": "PointResponse",
"ID": "Langenberg (Rothaargebirge, höchster Berg in NRW)",
"Attributes": {
"Longitude": 8.558333,
"Latitude": 51.276389,
"Elevation": 843.07,
"Actuality": "2021-03",
"Attribution": "DE-NW: © GeoBasis-DE / NRW (2025), dl-zero-de/2.0, www.geobasis.nrw.de",
"TileIndex": "32_469_5680",
"IsError": false,
"Error": {
"Code": "",
"Title": "",
"Detail": ""
}
}
}
API-Attribute 'UTMPointRequest'
Attribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
string |
Typ der Anfrage (UTMPointRequest) |
ID |
|
string |
ID der Anfrage |
Attributes |
|
struct |
Attribute der Anfrage |
|
Zone |
int |
UTM Zone (32/33) |
|
Easting |
float |
Easting, X, Ostwert |
|
Northing |
float |
Northing, Y, Nordwert |
API-Attribute 'UTMPointResponse'
Attribut |
Subattribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
|
string |
Typ der Antwort (UTMPointResponse) |
ID |
|
|
string |
ID der Antwort |
Attributes |
|
|
struct |
Attribute der Antwort |
|
Zone |
|
int |
UTM Zone |
|
Easting |
|
float |
Easting, X, Ostwert |
|
Northing |
|
float |
Northing, Y, Nordwert |
|
Elevation |
|
float |
Höhenwert (Meter) |
|
Actuality |
|
string |
Aktualität der Daten |
|
Attribution |
|
string |
Attribution der Daten |
|
TileIndex |
|
string |
Index des Quelldaten |
|
IsError |
|
bool |
Fehler (ja/nein) |
|
Error |
|
struct |
Fehlerdetails |
|
|
Code |
string |
Fehlernummer |
|
|
Title |
string |
Fehlerbeschreibung |
|
|
Details |
string |
Fehlerdetaillierung |
UTMPointRequest (Beispiel)
#!/bin/bash
#
# Abfrage der Höhendaten für einen UTM Punkt
postdata=$(cat <<EOF
{
"Type": "UTMPointRequest",
"ID": "GPS-Referenzpunkt Hannover",
"Attributes": {
"Zone": 32,
"Easting": 550251.23,
"Northing": 5802052.35
}
}
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/utmpoint
UTMPointResponse:
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
content-length: 430
date: Mon, 12 May 2025 07:39:07 GMT
{
"Type": "UTMPointResponse",
"ID": "GPS-Referenzpunkt Hannover",
"Attributes": {
"Zone": 32,
"Easting": 550251.23,
"Northing": 5802052.35,
"Elevation": 53.62300109863281,
"Actuality": "2016-04-18",
"Attribution": "DE-NI: © GeoBasis-DE / LGLN (2025), cc-by/4.0",
"TileIndex": "32_550_5802",
"IsError": false,
"Error": {
"Code": "",
"Title": "",
"Detail": ""
}
}
}
Anmerkungen
- Aus den Eingaben werden direkt die Höhendaten ermittelt.
- Es findet keine Transformation der Eingabedaten statt.
- Die Eingaben müssen dem CRS der Quelldaten entsprechen.
UTM-Zonen
Deutschland befindet sich überwiegend in der Zone 32 (6-12°). Marginale Flächen im Westen von Nordrhein-Westfalen befinden sich in der Zone 31 (0-6°).
Größere Gebiete im Osten von Deutschland befinden sich in der Zone 33 (12-18°). Bundesländer mit Flächen in zwei Zonen ordnen ihr gesamtes Gebiet logisch
einer einzigen Zone zu und dementsprechend sind die UTM-Koordinaten zu wählen.
Bundesland |
Zone 32 |
Zone 33 |
DGM1-Daten |
Anmerkungen |
Baden-Württemberg |
Ja |
Nein |
32 |
- |
Bayern |
Ja |
Ja |
32 |
Alle Flächen werden logisch der Zone 32 zugeordnet. |
Berlin |
Nein |
Ja |
Die Daten für Berlin sind in den Daten für Brandenburg enthalten (Zone 33). |
- |
Brandenburg |
Ja |
Ja |
33 |
Alle Flächen werden logisch der Zone 33 zugeordnet. |
Bremen |
Ja |
Nein |
32 |
- |
Hamburg |
Ja |
Nein |
32 |
- |
Hessen |
Ja |
Nein |
32 |
- |
Mecklenburg-Vorpommern |
Ja |
Ja |
33 |
Alle Flächen werden logisch der Zone 33 zugeordnet. |
Niedersachsen |
Ja |
Nein |
32 |
- |
Nordrhein-Westfalen |
Ja |
Nein |
32 |
NRW hat marginale Flächen in der Zone 31. Alle Flächen werden logisch der Zone 32 zugeordnet. |
Rheinland-Pfalz |
Ja |
Nein |
32 |
- |
Saarland |
Ja |
Nein |
32 |
- |
Sachsen |
Ja |
Ja |
33 |
Alle Flächen werden logisch der Zone 33 zugeordnet. |
Sachsen-Anhalt |
Ja |
Ja |
32 |
Alle Flächen werden logisch der Zone 32 zugeordnet. |
Schleswig-Holstein |
Ja |
Nein |
32 |
- |
Thüringen |
Ja |
Ja |
32 |
Alle Flächen werden logisch der Zone 32 zugeordnet. |
API-Attribute 'GPXRequest'
Attribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
string |
Typ der Anfrage (GPXRequest) |
ID |
|
string |
ID der Anfrage |
Attributes |
|
struct |
Attribute der Anfrage |
|
GPXData |
string |
GPX-Datei (Base64-Kodierung) |
API-Attribute 'GPXResponse'
Attribut |
Subattribut |
Subattribut |
Datentyp |
Beschreibung |
Type |
|
|
string |
Typ der Antwort (GPXResponse) |
ID |
|
|
string |
ID der Antwort |
Attributes |
|
|
struct |
Attribute der Antwort |
|
GPXPoints |
|
int |
Anzahl Punkte in der GPX-Datei |
|
DGMPoints |
|
int |
Anzahl Punkte mit DGM-Höhendaten |
|
Attributions |
|
[]string |
Attributionen der Daten |
|
Error |
|
struct |
Fehlerdetails |
|
|
Code |
string |
Fehlernummer |
|
|
Title |
string |
Fehlerbeschreibung |
|
|
Details |
string |
Fehlerdetaillierung |
GPXRequest (Beispiel)
#!/bin/bash
#
# Abfrage 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">
<wpt lat="51.276389" lon="8.558333">
<name>Langenberg (Rothaargebirge, höchster Berg in NRW)</name>
</wpt>
<wpt lat="51.179444" lon="8.488889">
<name>Kahler Asten (Rothaargebirge, zweithöchster Berg in NRW)</name>
</wpt>
</gpx>
EOF
)
gpxdataBase64=$(base64 -w 0 <<< "$gpxdata")
postdata=$(cat <<EOF
{
"Type": "GPXRequest",
"ID": "rothaargebirge.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/gpx
GPXResponse ('GPXData' gekürzt)
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
content-length: 1531
date: Tue, 22 Apr 2025 08:08:23 GMT
{
"Type": "GPXResponse",
"ID": "rothaargebirge.gpx",
"Attributes": {
"GPXData": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iV...yMDIxLTAzPC9kZXNjPgoJPC93cHQ+CjwvZ3B4Pg==",
"GPXPoints": 2,
"DGMPoints": 2,
"Attributions": [
"DE-NW: © GeoBasis-DE / NRW (2025), dl-zero-de/2.0, www.geobasis.nrw.de"
],
"IsError": false,
"Error": {
"Code": "",
"Title": "",
"Detail": ""
}
}
}
Erzeugte GPX-Datei
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="https://github.com/tkrajina/gpxgo">
<metadata>
<desc>Die Höhenangaben (ele) basieren auf DGM-Daten mit hoher Genauigkeit.</desc>
<author></author>
<copyright author="DE-NW: © GeoBasis-DE / NRW (2025), dl-zero-de/2.0, www.geobasis.nrw.de"></copyright>
</metadata>
<wpt lat="51.276389" lon="8.558333">
<ele>843.07</ele>
<name>Langenberg (Rothaargebirge, höchster Berg in NRW)</name>
<desc>ele: DE-NW, 2021-03</desc>
</wpt>
<wpt lat="51.179444" lon="8.488889">
<ele>839.83</ele>
<name>Kahler Asten (Rothaargebirge, zweithöchster Berg in NRW)</name>
<desc>ele: DE-NW, 2021-03</desc>
</wpt>
</gpx>
Abfragelimit
Pro Stunde sind maximal 18.000 Punktabfragen zulässig. Dies entspricht im Mittel 5 Punktabfragen pro Sekunde. Bei einer GPX-Datei zählt jeder einzelne Koordinatenpunkt als eine Punktabfrage.