{"id":13935349,"url":"https://github.com/datadesk/overpass-turbo-tutorial","last_synced_at":"2025-07-19T20:32:05.870Z","repository":{"id":66732086,"uuid":"66315487","full_name":"datadesk/overpass-turbo-tutorial","owner":"datadesk","description":"Code examples and tutorial on getting data out of OpenStreetMap","archived":true,"fork":false,"pushed_at":"2018-05-06T17:58:53.000Z","size":6,"stargazers_count":37,"open_issues_count":2,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-07T23:15:43.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadesk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-08-22T23:25:15.000Z","updated_at":"2024-04-29T01:38:57.000Z","dependencies_parsed_at":"2024-04-23T00:01:31.441Z","dependency_job_id":null,"html_url":"https://github.com/datadesk/overpass-turbo-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Foverpass-turbo-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Foverpass-turbo-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Foverpass-turbo-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Foverpass-turbo-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadesk","download_url":"https://codeload.github.com/datadesk/overpass-turbo-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226666740,"owners_count":17665074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-07T23:01:38.350Z","updated_at":"2025-07-19T20:32:05.847Z","avatar_url":"https://github.com/datadesk.png","language":null,"funding_links":[],"categories":["Others","Documentation/tutorials"],"sub_categories":[],"readme":"# overpass-turbo-turorial\n\nOpenStreetMap has a ton of data...on some things. It's a good place to get \"base map\" data like roads, rivers or other features. Addresses, businesses and other amenties may not be complete. But you can improve the data to make them complete!\n\nFirst, let's take a look at the interface.\n\nButtons:\n- **Run** fires off the code in the window. Result appears on the map to the right.\n- **Share** gives you a link of the current query to..umm...share\n- **Export** makes a sandwich. No! It allows you to download the result in GeoJSON, GPX, KML or XML.\n- **Wizard** helps your construct queries\n- **Save** keeps your query for the future\n- **Load** brings up any saved queries\n- **Settings** pick a new background, language and spin cycle\n- **Help** not as effective as 911\n\nYou can write a query to get anything in OpenStreetMap. The only real limit seems to be size and your ImAgInAtIoN. So, trying to download the nation's freeway system may not be possible. But you could for Los Angeles County.\n\nA good start is defining what you want in terms of OSM's tags. \n\n## Get all drinking fountains in Griffith Park\n\nFor instance, to download all the water fountains in Griffith Park you'll need to use OSM's tag [amenity=drinking_watter](http://wiki.openstreetmap.org/wiki/Tag:amenity%3Ddrinking_water). A quick Google search of search of the OSM Wiki will help you.\n\nThe easiest thing to do is to drop `amenity=drinking_watter` into Overpass turbo's \"Wizard\" if the map is showing Griffith Park.\n\n![drinkingwater](https://cloud.githubusercontent.com/assets/695934/17908091/d1466a30-6933-11e6-995f-db7df8a73eb6.gif)\n\n[Overpass turbo](http://overpass-turbo.eu/s/hZu)\n\n```\n/*\nThis has been generated by the overpass-turbo wizard.\nThe original search was:\n“amenity=drinking_water”\n*/\n[out:json][timeout:25];\n// gather results\n(\n  // query part for: “amenity=drinking_water”\n  node[\"amenity\"=\"drinking_water\"]({{bbox}});\n  way[\"amenity\"=\"drinking_water\"]({{bbox}});\n  relation[\"amenity\"=\"drinking_water\"]({{bbox}});\n);\n// print results\nout body;\n\u003e;\nout skel qt;\n```\n## Get all the freeways\n\n![River homeless map](http://latimes-graphics-media.s3.amazonaws.com/assets/img/la-me-g-river-dwellers-04242016.png)\n\nOne common problem is to create a line map of just the freeways for reference (and nothing else). The Census provides a file for primary roads, but it excludes highways like the 101. \n\n![screen shot 2016-08-23 at 1 39 55 pm](https://cloud.githubusercontent.com/assets/695934/17908895/1b52e47a-6937-11e6-9457-48e5fdcfc089.png)\nCensus primary roads\n\nIt takes a combination of secondary and primary roads to get all the \"freeways\" like the 101 and the 134.\n\n![screen shot 2016-08-23 at 1 41 05 pm](https://cloud.githubusercontent.com/assets/695934/17908936/42edfbc8-6937-11e6-8672-c5daf4f646c7.png)\n\nBut the census file also includes roads like Santa Monica Boulevard which we wouldn't want to include. \n\nThe OSM tagging for freeways (and any roads or paths) is to use [highway=](http://wiki.openstreetmap.org/wiki/Key:highway)\n\nFreeways fit into highway=motorway\n\n![screen shot 2016-08-23 at 1 58 47 pm](https://cloud.githubusercontent.com/assets/695934/17909542/bda23fd0-6939-11e6-8b6a-87e446a3baaa.png)\n\n[Overpass turbo](http://overpass-turbo.eu/s/hZx)\n```\n/*\nThis has been generated by the overpass-turbo wizard.\nThe original search was:\n“highway=motorway”\n*/\n[out:json][timeout:25];\n// gather results\n(\n  // query part for: “highway=motorway”\n  node[\"highway\"=\"motorway\"]({{bbox}});\n  way[\"highway\"=\"motorway\"]({{bbox}});\n  relation[\"highway\"=\"motorway\"]({{bbox}});\n);\n// print results\nout body;\n\u003e;\nout skel qt;\n```\n\n## Download everything!\n\nYou can leave the attributes out and just get anything that's a node, way or relation.\n\n[Overpass turbo](http://overpass-turbo.eu/s/hZy)\n\n![screen shot 2016-08-23 at 2 16 58 pm](https://cloud.githubusercontent.com/assets/695934/17910096/4e30dc1c-693c-11e6-8c64-3eea45a45ec3.png)\n\n## Define your own bounds\nBy default the bounding box defaults to the boundaries of the map. {{box}}\n\nBut you can specify your own boundaries using this order\n`(lat_min, lon_min, lat_max, lon_max)`\n\n[Overpass turbo](http://overpass-turbo.eu/s/hZz)\n\n```\n/*\nThis has been generated by the overpass-turbo wizard.\nThe original search was:\n“\"Drinking Water\"”\n*/\n[out:json][timeout:25];\n// gather results\n(\n  // query part for: “\"Drinking Water\"”\n  node(35.4808,-118.4676,35.6666,-118.2051);\n  way(35.4808,-118.4676,35.6666,-118.2051);\n  relation(35.4808,-118.4676,35.6666,-118.2051);\n);\n// print results\nout body;\n\u003e;\nout skel qt;\n```\n\n\n## Drinking fountains of yore in Griffith Park (before Anthony added some more)\n\n![screen_shot_2016-08-23_at_1_23_35_pm](https://cloud.githubusercontent.com/assets/695934/17908353/fad4b7ca-6934-11e6-8367-17519ac2bc48.png)\n\n\nYou can search for data in the past by adding a date next to the timeout. You'll also need to change `out body;` to `out meta;`\n\n[Overpass turbo](http://overpass-turbo.eu/s/hZt)\n\n```\n/*\nThis has been generated by the overpass-turbo wizard.\nThe original search was:\n“amenity=drinking_water”\n*/\n[out:json][timeout:25][date:\"2016-08-21T00:00:00Z\"];\n// gather results\n(\n  // query part for: “amenity=drinking_water”\n  node[\"amenity\"=\"drinking_water\"]({{bbox}});\n  way[\"amenity\"=\"drinking_water\"]({{bbox}});\n  relation[\"amenity\"=\"drinking_water\"]({{bbox}});\n);\n// print results\nout meta;\n\u003e;\nout skel qt;\n```\n\n## Request too big?\nYou can download straight out of Overpass turbo if you're request is too big. \n\n## More examples\nhttp://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadesk%2Foverpass-turbo-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadesk%2Foverpass-turbo-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadesk%2Foverpass-turbo-tutorial/lists"}