Overpass query example

Speed cameras

Find fixed speed cameras in a country. Example: the Netherlands.

Fixed speed cameras are points tagged highway=speed_camera. Some have maxspeed and a direction.

The query

[out:json][timeout:60];
area["ISO3166-1"="NL"][admin_level=2]->.nl;
node["highway"="speed_camera"](area.nl)(50.5,2.5,54.0,7.5);
out;

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. Speed cameras are mapped as points next to or on the road.
  2. The country boundary of the Netherlands includes the Caribbean islands of the kingdom, such as Aruba and Bonaire. The bounding box (50.5,2.5,54.0,7.5) keeps the European part.
  3. Coverage depends on local mappers and laws; some countries don't map them.

Variations

  • Red-light and section control cameras often use enforcement relations: rel["enforcement"].

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 →