Overpass query example

Named lakes of a country

Get lake outlines, including multipolygons, with their names. Example: Switzerland.

Water bodies are areas tagged natural=water, with water=lake for lakes. Big lakes are multipolygon relations made of many ways, so search ways and relations (wr).

The query

[out:json][timeout:60];
area["ISO3166-1"="CH"][admin_level=2]->.ch;
wr["natural"="water"]["water"="lake"]["name"](area.ch);
out geom;

Run it

Running the query…

Live result from overpass.ch, cached for up to 12 hours. Map data © OpenStreetMap contributors (ODbL).

How it works

  1. wr searches ways and relations; lakes are never single nodes.
  2. ["name"] keeps only named lakes, which drops thousands of ponds.
  3. out geom; returns relation members with coordinates; join the outer rings to draw them.

Variations

Run it from your code

curl https://api.overpass.ch/v1/YOUR_API_KEY/interpreter \
  --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 →