{"id":16685129,"url":"https://github.com/1ec5/apple-turnover","last_synced_at":"2025-07-05T00:03:00.970Z","repository":{"id":142589960,"uuid":"112885938","full_name":"1ec5/apple-turnover","owner":"1ec5","description":"Half-baked OpenStreetMap turn lane analysis","archived":false,"fork":false,"pushed_at":"2017-12-16T12:22:47.000Z","size":59,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T03:25:01.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1ec5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2017-12-02T23:41:44.000Z","updated_at":"2021-02-03T23:14:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b3df87c-e9e9-4002-819f-e2409d03b9f4","html_url":"https://github.com/1ec5/apple-turnover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1ec5/apple-turnover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1ec5%2Fapple-turnover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1ec5%2Fapple-turnover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1ec5%2Fapple-turnover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1ec5%2Fapple-turnover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1ec5","download_url":"https://codeload.github.com/1ec5/apple-turnover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1ec5%2Fapple-turnover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260470980,"owners_count":23014215,"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-10-12T14:46:08.205Z","updated_at":"2025-07-05T00:03:00.949Z","avatar_url":"https://github.com/1ec5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apple Turnover\n\n[\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Pastry-Turnover-Apple.jpg/640px-Pastry-Turnover-Apple.jpg\" width=\"320\" alt=\"Half-baked OpenStreetMap turn lane analysis\"\u003e](https://commons.wikimedia.org/wiki/File:Pastry-Turnover-Apple.jpg)\n\nApple Turnover is a tool that performs basic analysis on the attributes of [turn lanes](https://wiki.openstreetmap.org/wiki/Key:turn) in [OpenStreetMap](https://www.openstreetmap.org/).\n\n## Features\n\nWith Apple Turnover, you can gather statistics about the lengths of turn lanes by speed limit, highway classification, or other attributes. Apple Turnover contains the following all-natural ingredients:\n\n* Recognizes `:forward`, `:backward`, two-way, and one-way turn lane data\n* Correctly handles left and right turn lanes on the same road in which the lanes’ start and end points are staggered\n* Spans maneuvers across multiple ways split due to changes in lane count, speed limit, name, etc.\n* Consolidates maneuvers that are multiple lanes wide\n* Distinguishes between segments of turn lanes that allow and disallow lane changes\n\n## How to bake\n\n1. Clone this repository and run `npm install` to install this tool’s dependencies.\n1. Using [Overpass turbo](http://overpass-turbo.eu/), query for turn lanes in a specific region in which turn lanes have been mapped. Examples:\n   * [Greater Cincinnati and Northern Kentucky](http://overpass-turbo.eu/s/tFY)\n   * [Santa Clara County, California](http://overpass-turbo.eu/s/tJv)\n1. Click the Export button. Under the Data section, choose “raw data” and save the file to disk.\n1. Run the following command to analyze the exported file and output the results:\n   ```bash\n   node index.js export.json output.csv\n   ```\n   If no output file is specified, the tool outputs to the command line.\n\n## Output format\n\nThe output file is a tab-delimited file. Each line represents one maneuver, such as a left turn or right turn. Only explicitly tagged maneuvers (i.e., `turn:lanes:forward`) are accounted for. The file has the following columns:\n\n* ID of the node at the beginning of the turn lane\n* ID of the node at the end of the turn lane, where the driver turns\n* `left`, `right`, or `reverse`, as indicated by lane markings or signage; combinations of maneuvers, such as `left;right`, result in separate maneuvers\n* The `highway` tag of the way at the end of the turn lane\n* The `highway` tag of the way onto which the driver turns (the cross street)\n* The number of lanes that may be used for this maneuver\n* The length (in meters) of the turn lane\n* The length (in meters) of the portion of the turn lane that is surrounded by lane change restrictions; left blank if the entire lane is subject to lane change restrictions\n* The explicit maximum speed limit (in meters per second) along the turn lane; if the speed limit varies along the turn lane, an average weighted by distance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1ec5%2Fapple-turnover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1ec5%2Fapple-turnover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1ec5%2Fapple-turnover/lists"}