On a lake, the elevation model returns the water surface, not the bottom. With out center; and elevation=1, every lake gets its surface elevation.
This query lists the named lakes of Switzerland, from the highest mountain lakes down to the lakes of Ticino.
The query
[out:json][timeout:90]; area["ISO3166-1"="CH"][admin_level=2]->.ch; nwr["natural"="water"]["water"="lake"]["name"](area.ch); out center;
Run it
Live result from overpass.ch, cached for up to 12 hours. Map data © OpenStreetMap contributors (ODbL). Heights produced using Copernicus WorldDEM™-90 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved. Sea depths: GEBCO Compilation Group (2026) GEBCO 2026 Grid.
How it works
["natural"="water"]["water"="lake"]["name"]finds named lakes. Big lakes are multipolygon relations.out center;gives the centre of the bounding box around each lake, andelevation=1the height there.- For the lakes with an
eletag, the median difference is below 1 m. - The centre of a long, curved lake can fall on the shore: for Lago Maggiore it reads 256 m instead of 193 m. For those, look up a point you know is on the water.
Variations
- Reservoirs:
["water"="reservoir"]; their dams areway["waterway"="dam"]. - The outlines:
out geom;, as in named lakes of a country. Withelevation=1every outline point then gets a height, which uses many more lookups.
Run it from your code
The query is unchanged; elevation=1 in the URL adds the heights. Each height uses one lookup from your elevation allowance.
curl 'https://api.overpass.ch/v1/YOUR_API_KEY/interpreter?elevation=1' \
--data-urlencode 'data@query.overpassql'
import requests
query = open("query.overpassql").read()
r = requests.post("https://api.overpass.ch/v1/YOUR_API_KEY/interpreter",
params={"elevation": 1}, data={"data": query}, timeout=120)
r.raise_for_status()
for el in r.json()["elements"]:
height = el.get("elevation") or el.get("center", {}).get("elevation")
print(el.get("tags", {}).get("name"), height)
const res = await fetch("https://api.overpass.ch/v1/YOUR_API_KEY/interpreter?elevation=1", {
method: "POST",
body: new URLSearchParams({ data: query }),
});
if (!res.ok) throw new Error(await res.text());
const { elements } = await res.json();
for (const el of elements) console.log(el.tags?.name, el.elevation ?? el.center?.elevation);
Save the query as query.overpassql. It works the same in Overpass Turbo, QGIS and JOSM.