{"action":"created","comment":{"url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments/243366348","pull_request_review_id":187115641,"id":243366348,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzM2NjM0OA==","diff_hunk":"@@ -1,36 +1,47 @@\n package org.openstreetmap.atlas.checks.validation.linear.edges;\n \n-import java.util.ArrayList;\n import java.util.Arrays;\n-import java.util.HashSet;\n-import java.util.LinkedList;\n import java.util.List;\n import java.util.Optional;\n-import java.util.Queue;\n import java.util.Set;\n+import java.util.function.Function;\n+import java.util.stream.Stream;\n \n import org.openstreetmap.atlas.checks.base.BaseCheck;\n import org.openstreetmap.atlas.checks.flag.CheckFlag;\n+import org.openstreetmap.atlas.exception.CoreException;\n+import org.openstreetmap.atlas.geography.PolyLine;\n+import org.openstreetmap.atlas.geography.Polygon;\n import org.openstreetmap.atlas.geography.atlas.items.AtlasObject;\n import org.openstreetmap.atlas.geography.atlas.items.Edge;\n+import org.openstreetmap.atlas.geography.atlas.items.Node;\n+import org.openstreetmap.atlas.geography.atlas.items.Route;\n+import org.openstreetmap.atlas.geography.atlas.walker.SimpleEdgeWalker;\n+import org.openstreetmap.atlas.tags.BridgeTag;\n+import org.openstreetmap.atlas.tags.HighwayTag;\n import org.openstreetmap.atlas.tags.ISOCountryTag;\n import org.openstreetmap.atlas.tags.JunctionTag;\n+import org.openstreetmap.atlas.tags.LayerTag;\n+import org.openstreetmap.atlas.tags.TunnelTag;\n+import org.openstreetmap.atlas.tags.annotations.validation.Validators;\n import org.openstreetmap.atlas.utilities.configuration.Configuration;\n \n /**\n- * This check flags roundabouts where the directionality is opposite to what it should be, where the\n- * roundabout is multi-directional, or where the roundabout has incorrect geometry (concave).\n+ * This check flags roundabouts where the directionality is opposite to what it should be, the\n+ * roundabout is multi-directional, the roundabout is incomplete, part of the roundabout is not car\n+ * navigable, or the roundabout has car navigable edges inside it.\n  *\n  * @author savannahostrowski\n+ * @author bbreithaupt\n  */\n \n public class MalformedRoundaboutCheck extends BaseCheck\n {\n     private static final long serialVersionUID = -3018101860747289836L;\n-    private static final String WRONG_WAY_INSTRUCTIONS = \"This roundabout, {0,number,#}, is going the\"\n+    private static final String WRONG_WAY_INSTRUCTIONS = \"This roundabout is going the\"\n             + \" wrong direction, or has been improperly tagged as a roundabout.\";\n-    private static final String MULTIDIRECTIONAL_INSTRUCTIONS = \"This roundabout, {0,number,#}, is\"\n-            + \" multi-directional, or the roundabout has improper angle geometry.\";\n+    private static final String INCOMPLETE_ROUTE_INSTRUCTIONS = \"This roundabout does not form a single, one-way, complete, car navigable route.\";\n+    private static final String ENCLOSED_ROADS_INSTRUCTIONS = \"This roundabout has car navigable ways inside it.\";","path":"src/main/java/org/openstreetmap/atlas/checks/validation/linear/edges/MalformedRoundaboutCheck.java","position":53,"original_position":53,"commit_id":"91a01a5fcf09b370fd8248d807b736f919e6ba1e","original_commit_id":"91a01a5fcf09b370fd8248d807b736f919e6ba1e","user":{"login":"jklamer","id":9659948,"node_id":"MDQ6VXNlcjk2NTk5NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/9659948?v=4","gravatar_id":"","url":"https://api.github.com/users/jklamer","html_url":"https://github.com/jklamer","followers_url":"https://api.github.com/users/jklamer/followers","following_url":"https://api.github.com/users/jklamer/following{/other_user}","gists_url":"https://api.github.com/users/jklamer/gists{/gist_id}","starred_url":"https://api.github.com/users/jklamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklamer/subscriptions","organizations_url":"https://api.github.com/users/jklamer/orgs","repos_url":"https://api.github.com/users/jklamer/repos","events_url":"https://api.github.com/users/jklamer/events{/privacy}","received_events_url":"https://api.github.com/users/jklamer/received_events","type":"User","site_admin":false},"body":"Can you clarify why it's a problem that there are car navigable ways inside the roundabout? Does it make the roundabout improperly formed?","created_at":"2018-12-20T18:05:05Z","updated_at":"2018-12-20T18:20:07Z","html_url":"https://github.com/osmlab/atlas-checks/pull/110#discussion_r243366348","pull_request_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments/243366348"},"html":{"href":"https://github.com/osmlab/atlas-checks/pull/110#discussion_r243366348"},"pull_request":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110","id":239236370,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MjM2Mzcw","html_url":"https://github.com/osmlab/atlas-checks/pull/110","diff_url":"https://github.com/osmlab/atlas-checks/pull/110.diff","patch_url":"https://github.com/osmlab/atlas-checks/pull/110.patch","issue_url":"https://api.github.com/repos/osmlab/atlas-checks/issues/110","number":110,"state":"open","locked":false,"title":"Roundabout Revamp","user":{"login":"Bentleysb","id":24948563,"node_id":"MDQ6VXNlcjI0OTQ4NTYz","avatar_url":"https://avatars0.githubusercontent.com/u/24948563?v=4","gravatar_id":"","url":"https://api.github.com/users/Bentleysb","html_url":"https://github.com/Bentleysb","followers_url":"https://api.github.com/users/Bentleysb/followers","following_url":"https://api.github.com/users/Bentleysb/following{/other_user}","gists_url":"https://api.github.com/users/Bentleysb/gists{/gist_id}","starred_url":"https://api.github.com/users/Bentleysb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bentleysb/subscriptions","organizations_url":"https://api.github.com/users/Bentleysb/orgs","repos_url":"https://api.github.com/users/Bentleysb/repos","events_url":"https://api.github.com/users/Bentleysb/events{/privacy}","received_events_url":"https://api.github.com/users/Bentleysb/received_events","type":"User","site_admin":false},"body":"### Description:\r\n\r\nThis pr is to consolidate and enhance the existing roundabout checks (MalformedRoundabout, RoundaboutValance, and RoundaboutClosedLoop). Previous to this pr, these checks heavily overlapped both in code and flags, with ClosedLoop being almost entirely redundant (see the venn diagram below). As such, the functionality has been consolidated into Malformed and Valance, while abstracting out duplicate code. \r\nMalformed now checks for directionality, non-valence routing, and overlapping or enclosed edges. Valance now checks both node and overall valence. ClosedLoop is entirely redundant and can be deprecated. \r\nIn addition to consolidation, both checks have been enhanced with new or altered features. Both now use [SimpleEdgeWalker](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/walker/SimpleEdgeWalker.java) to gather all edges in a roundabout. Valance now filters out any non-car navigable edges, as these edges often don't follow the same valence rules. Malformed has enhanced direction detection by using the Route class to build a polyline from the set of Edges, and using an average direction to allow for stranger shaped roundabouts. Malformed also has all new intersecting/enclosed edge detection to find miss-mapped ways and throughabouts.  \r\n\r\nFor more information and examples of what each check flags, please see the updated .md docs for each check. \r\n\r\nCheck overlap from 20 countries (506 flag total):\r\n<img width=\"300\" alt=\"ven_diagram\" src=\"https://user-images.githubusercontent.com/24948563/50105977-3763c480-01e3-11e9-9b9b-958b88729017.png\">\r\n\r\n### Potential Impact:\r\n\r\nNegligible \r\n\r\n### Unit Test Approach:\r\n\r\nMalformed's unit test were updated to include highway tags. There were also a large number added to test the newly added functions. \r\nValance's unit test were heavily reworked to accommodate node valance testing. All coordinates have been redone, junction tags added, and extra tests created for node valance testing. \r\n\r\n### Test Results:\r\n\r\nExtensive testing and comparison against old results shows that all old true positives remain, while many false positives and false negatives are now handled correctly. Sampled results from 20 countries showed a near 0% false positive rate for both checks. \r\n\r\n","created_at":"2018-12-17T18:08:00Z","updated_at":"2018-12-20T18:20:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f93ccd6c2dd97620c1832fb3b42b763c7fa7b579","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110/commits","review_comments_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110/comments","review_comment_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osmlab/atlas-checks/issues/110/comments","statuses_url":"https://api.github.com/repos/osmlab/atlas-checks/statuses/91a01a5fcf09b370fd8248d807b736f919e6ba1e","head":{"label":"Bentleysb:dev-roundaboutRevamp","ref":"dev-roundaboutRevamp","sha":"91a01a5fcf09b370fd8248d807b736f919e6ba1e","user":{"login":"Bentleysb","id":24948563,"node_id":"MDQ6VXNlcjI0OTQ4NTYz","avatar_url":"https://avatars0.githubusercontent.com/u/24948563?v=4","gravatar_id":"","url":"https://api.github.com/users/Bentleysb","html_url":"https://github.com/Bentleysb","followers_url":"https://api.github.com/users/Bentleysb/followers","following_url":"https://api.github.com/users/Bentleysb/following{/other_user}","gists_url":"https://api.github.com/users/Bentleysb/gists{/gist_id}","starred_url":"https://api.github.com/users/Bentleysb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bentleysb/subscriptions","organizations_url":"https://api.github.com/users/Bentleysb/orgs","repos_url":"https://api.github.com/users/Bentleysb/repos","events_url":"https://api.github.com/users/Bentleysb/events{/privacy}","received_events_url":"https://api.github.com/users/Bentleysb/received_events","type":"User","site_admin":false},"repo":{"id":132798041,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI3OTgwNDE=","name":"atlas-checks","full_name":"Bentleysb/atlas-checks","private":false,"owner":{"login":"Bentleysb","id":24948563,"node_id":"MDQ6VXNlcjI0OTQ4NTYz","avatar_url":"https://avatars0.githubusercontent.com/u/24948563?v=4","gravatar_id":"","url":"https://api.github.com/users/Bentleysb","html_url":"https://github.com/Bentleysb","followers_url":"https://api.github.com/users/Bentleysb/followers","following_url":"https://api.github.com/users/Bentleysb/following{/other_user}","gists_url":"https://api.github.com/users/Bentleysb/gists{/gist_id}","starred_url":"https://api.github.com/users/Bentleysb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bentleysb/subscriptions","organizations_url":"https://api.github.com/users/Bentleysb/orgs","repos_url":"https://api.github.com/users/Bentleysb/repos","events_url":"https://api.github.com/users/Bentleysb/events{/privacy}","received_events_url":"https://api.github.com/users/Bentleysb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Bentleysb/atlas-checks","description":"OSM data integrity checks with Atlas","fork":true,"url":"https://api.github.com/repos/Bentleysb/atlas-checks","forks_url":"https://api.github.com/repos/Bentleysb/atlas-checks/forks","keys_url":"https://api.github.com/repos/Bentleysb/atlas-checks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bentleysb/atlas-checks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bentleysb/atlas-checks/teams","hooks_url":"https://api.github.com/repos/Bentleysb/atlas-checks/hooks","issue_events_url":"https://api.github.com/repos/Bentleysb/atlas-checks/issues/events{/number}","events_url":"https://api.github.com/repos/Bentleysb/atlas-checks/events","assignees_url":"https://api.github.com/repos/Bentleysb/atlas-checks/assignees{/user}","branches_url":"https://api.github.com/repos/Bentleysb/atlas-checks/branches{/branch}","tags_url":"https://api.github.com/repos/Bentleysb/atlas-checks/tags","blobs_url":"https://api.github.com/repos/Bentleysb/atlas-checks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bentleysb/atlas-checks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bentleysb/atlas-checks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bentleysb/atlas-checks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bentleysb/atlas-checks/statuses/{sha}","languages_url":"https://api.github.com/repos/Bentleysb/atlas-checks/languages","stargazers_url":"https://api.github.com/repos/Bentleysb/atlas-checks/stargazers","contributors_url":"https://api.github.com/repos/Bentleysb/atlas-checks/contributors","subscribers_url":"https://api.github.com/repos/Bentleysb/atlas-checks/subscribers","subscription_url":"https://api.github.com/repos/Bentleysb/atlas-checks/subscription","commits_url":"https://api.github.com/repos/Bentleysb/atlas-checks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bentleysb/atlas-checks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bentleysb/atlas-checks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bentleysb/atlas-checks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bentleysb/atlas-checks/contents/{+path}","compare_url":"https://api.github.com/repos/Bentleysb/atlas-checks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bentleysb/atlas-checks/merges","archive_url":"https://api.github.com/repos/Bentleysb/atlas-checks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bentleysb/atlas-checks/downloads","issues_url":"https://api.github.com/repos/Bentleysb/atlas-checks/issues{/number}","pulls_url":"https://api.github.com/repos/Bentleysb/atlas-checks/pulls{/number}","milestones_url":"https://api.github.com/repos/Bentleysb/atlas-checks/milestones{/number}","notifications_url":"https://api.github.com/repos/Bentleysb/atlas-checks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bentleysb/atlas-checks/labels{/name}","releases_url":"https://api.github.com/repos/Bentleysb/atlas-checks/releases{/id}","deployments_url":"https://api.github.com/repos/Bentleysb/atlas-checks/deployments","created_at":"2018-05-09T18:31:15Z","updated_at":"2018-12-17T22:19:33Z","pushed_at":"2018-12-18T23:10:09Z","git_url":"git://github.com/Bentleysb/atlas-checks.git","ssh_url":"git@github.com:Bentleysb/atlas-checks.git","clone_url":"https://github.com/Bentleysb/atlas-checks.git","svn_url":"https://github.com/Bentleysb/atlas-checks","homepage":null,"size":13370,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"osmlab:dev","ref":"dev","sha":"2fd747bdb5e5d74f129dea201ac4c873ac40ed5a","user":{"login":"osmlab","id":3856374,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NTYzNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3856374?v=4","gravatar_id":"","url":"https://api.github.com/users/osmlab","html_url":"https://github.com/osmlab","followers_url":"https://api.github.com/users/osmlab/followers","following_url":"https://api.github.com/users/osmlab/following{/other_user}","gists_url":"https://api.github.com/users/osmlab/gists{/gist_id}","starred_url":"https://api.github.com/users/osmlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osmlab/subscriptions","organizations_url":"https://api.github.com/users/osmlab/orgs","repos_url":"https://api.github.com/users/osmlab/repos","events_url":"https://api.github.com/users/osmlab/events{/privacy}","received_events_url":"https://api.github.com/users/osmlab/received_events","type":"Organization","site_admin":false},"repo":{"id":99742504,"node_id":"MDEwOlJlcG9zaXRvcnk5OTc0MjUwNA==","name":"atlas-checks","full_name":"osmlab/atlas-checks","private":false,"owner":{"login":"osmlab","id":3856374,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NTYzNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3856374?v=4","gravatar_id":"","url":"https://api.github.com/users/osmlab","html_url":"https://github.com/osmlab","followers_url":"https://api.github.com/users/osmlab/followers","following_url":"https://api.github.com/users/osmlab/following{/other_user}","gists_url":"https://api.github.com/users/osmlab/gists{/gist_id}","starred_url":"https://api.github.com/users/osmlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osmlab/subscriptions","organizations_url":"https://api.github.com/users/osmlab/orgs","repos_url":"https://api.github.com/users/osmlab/repos","events_url":"https://api.github.com/users/osmlab/events{/privacy}","received_events_url":"https://api.github.com/users/osmlab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/osmlab/atlas-checks","description":"OSM data integrity checks with Atlas","fork":false,"url":"https://api.github.com/repos/osmlab/atlas-checks","forks_url":"https://api.github.com/repos/osmlab/atlas-checks/forks","keys_url":"https://api.github.com/repos/osmlab/atlas-checks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osmlab/atlas-checks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osmlab/atlas-checks/teams","hooks_url":"https://api.github.com/repos/osmlab/atlas-checks/hooks","issue_events_url":"https://api.github.com/repos/osmlab/atlas-checks/issues/events{/number}","events_url":"https://api.github.com/repos/osmlab/atlas-checks/events","assignees_url":"https://api.github.com/repos/osmlab/atlas-checks/assignees{/user}","branches_url":"https://api.github.com/repos/osmlab/atlas-checks/branches{/branch}","tags_url":"https://api.github.com/repos/osmlab/atlas-checks/tags","blobs_url":"https://api.github.com/repos/osmlab/atlas-checks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osmlab/atlas-checks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osmlab/atlas-checks/git/refs{/sha}","trees_url":"https://api.github.com/repos/osmlab/atlas-checks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osmlab/atlas-checks/statuses/{sha}","languages_url":"https://api.github.com/repos/osmlab/atlas-checks/languages","stargazers_url":"https://api.github.com/repos/osmlab/atlas-checks/stargazers","contributors_url":"https://api.github.com/repos/osmlab/atlas-checks/contributors","subscribers_url":"https://api.github.com/repos/osmlab/atlas-checks/subscribers","subscription_url":"https://api.github.com/repos/osmlab/atlas-checks/subscription","commits_url":"https://api.github.com/repos/osmlab/atlas-checks/commits{/sha}","git_commits_url":"https://api.github.com/repos/osmlab/atlas-checks/git/commits{/sha}","comments_url":"https://api.github.com/repos/osmlab/atlas-checks/comments{/number}","issue_comment_url":"https://api.github.com/repos/osmlab/atlas-checks/issues/comments{/number}","contents_url":"https://api.github.com/repos/osmlab/atlas-checks/contents/{+path}","compare_url":"https://api.github.com/repos/osmlab/atlas-checks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osmlab/atlas-checks/merges","archive_url":"https://api.github.com/repos/osmlab/atlas-checks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osmlab/atlas-checks/downloads","issues_url":"https://api.github.com/repos/osmlab/atlas-checks/issues{/number}","pulls_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls{/number}","milestones_url":"https://api.github.com/repos/osmlab/atlas-checks/milestones{/number}","notifications_url":"https://api.github.com/repos/osmlab/atlas-checks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osmlab/atlas-checks/labels{/name}","releases_url":"https://api.github.com/repos/osmlab/atlas-checks/releases{/id}","deployments_url":"https://api.github.com/repos/osmlab/atlas-checks/deployments","created_at":"2017-08-08T22:46:46Z","updated_at":"2018-12-19T22:56:34Z","pushed_at":"2018-12-19T23:02:06Z","git_url":"git://github.com/osmlab/atlas-checks.git","ssh_url":"git@github.com:osmlab/atlas-checks.git","clone_url":"https://github.com/osmlab/atlas-checks.git","svn_url":"https://github.com/osmlab/atlas-checks","homepage":null,"size":13112,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":23,"open_issues":4,"watchers":26,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110"},"html":{"href":"https://github.com/osmlab/atlas-checks/pull/110"},"issue":{"href":"https://api.github.com/repos/osmlab/atlas-checks/issues/110"},"comments":{"href":"https://api.github.com/repos/osmlab/atlas-checks/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/osmlab/atlas-checks/statuses/91a01a5fcf09b370fd8248d807b736f919e6ba1e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jklamer"}}