Overpass query example

Mountain huts and their altitude

Every mountain hut in a region with its altitude, highest first, from elevation=1. Example: the canton of Valais.

Not every hut has an ele tag. With elevation=1 every result gets the height of the terrain at its position, so you can sort, filter or colour huts by altitude without gaps.

This query lists the staffed mountain huts in the canton of Valais.

The query

[out:json][timeout:60];
area["ISO3166-2"="CH-VS"]->.valais;
nwr["tourism"="alpine_hut"](area.valais);
out center;

Run it

Running the query…

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

  1. area["ISO3166-2"="CH-VS"] is the canton of Valais, by its ISO 3166-2 code. Unlike the name, the code is unambiguous.
  2. out center; gives one point per hut, also for huts mapped as a building. With elevation=1, the center gets the elevation field.
  3. Huts stand on slopes and saddles rather than on sharp tops, so the model agrees with ele to within about 10 m in the median.
  4. The exception is the highest one: the Capanna Regina Margherita stands on the summit of the Signalkuppe at 4,554 m, where the model reads about 60 m low.

Variations

  • Nodes carry the height directly, ways and relations in their centre: h = el.get("elevation") or el["center"]["elevation"].
  • Unstaffed shelters too: nwr["tourism"~"^(alpine_hut|wilderness_hut)$"], as in mountain huts.

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'

Save the query as query.overpassql. It works the same in Overpass Turbo, QGIS and JOSM.

More examples

All examples →