{"action":"created","comment":{"url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments/176605921","pull_request_review_id":106341517,"id":176605921,"diff_hunk":"@@ -144,4 +170,36 @@ else if (object instanceof Area)\n     {\n         return FALLBACK_INSTRUCTIONS;\n     }\n+\n+    /**\n+     * Returns true if adjacent {@link Edge} has identical lat,lng sequences\n+     *\n+     * @param polyline\n+     *            the {@link PolyLine} being examined\n+     * @return {@code true} if the any set of adjacent edges have identical geometries\n+     */\n+    private boolean hasDuplicateEdges(final PolyLine polyline)\n+    {\n+        final List<Segment> segments = polyline.segments();\n+        final List<Segment> duplicates = new ArrayList<>();\n+\n+        // Loop through Polyline Segments\n+        for (int i = 0; i < segments.size(); i++)\n+        {\n+            final Segment segment = segments.get(i);\n+            final int adjacentEdge = i + 2;\n+\n+            // Check if segment exists elsewhere in List\n+            if (segments.indexOf(segment) != segments.lastIndexOf(segment))\n+            {\n+                // If adjacent segment is the same value as our current, duplicate exists\n+                if (adjacentEdge < segments.size() && segment.equals(segments.get(adjacentEdge)))\n+                {\n+                    duplicates.add(segment);\n+                }\n+            }\n+        }\n+\n+        return duplicates.size() > 0;","path":"src/main/java/org/openstreetmap/atlas/checks/validation/intersections/SelfIntersectingPolylineCheck.java","position":152,"original_position":152,"commit_id":"99581f6972c798b05fad4ab1be0d335a59132da7","original_commit_id":"99581f6972c798b05fad4ab1be0d335a59132da7","user":{"login":"mertemin","id":597707,"avatar_url":"https://avatars3.githubusercontent.com/u/597707?v=4","gravatar_id":"","url":"https://api.github.com/users/mertemin","html_url":"https://github.com/mertemin","followers_url":"https://api.github.com/users/mertemin/followers","following_url":"https://api.github.com/users/mertemin/following{/other_user}","gists_url":"https://api.github.com/users/mertemin/gists{/gist_id}","starred_url":"https://api.github.com/users/mertemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mertemin/subscriptions","organizations_url":"https://api.github.com/users/mertemin/orgs","repos_url":"https://api.github.com/users/mertemin/repos","events_url":"https://api.github.com/users/mertemin/events{/privacy}","received_events_url":"https://api.github.com/users/mertemin/received_events","type":"User","site_admin":false},"body":"Wait you don't need to keep track of `duplicates`. Whenever a duplicate is found inside `for` loop, just return true. Otherwise, false could be returned after `for` loop.","created_at":"2018-03-22T23:50:20Z","updated_at":"2018-03-22T23:50:20Z","html_url":"https://github.com/osmlab/atlas-checks/pull/23#discussion_r176605921","pull_request_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/comments/176605921"},"html":{"href":"https://github.com/osmlab/atlas-checks/pull/23#discussion_r176605921"},"pull_request":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23"}},"in_reply_to_id":176604700},"pull_request":{"url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23","id":171262382,"html_url":"https://github.com/osmlab/atlas-checks/pull/23","diff_url":"https://github.com/osmlab/atlas-checks/pull/23.diff","patch_url":"https://github.com/osmlab/atlas-checks/pull/23.patch","issue_url":"https://api.github.com/repos/osmlab/atlas-checks/issues/23","number":23,"state":"closed","locked":false,"title":"SelfIntersectingPolylineCheck enhancements","user":{"login":"danielduhh","id":1947857,"avatar_url":"https://avatars0.githubusercontent.com/u/1947857?v=4","gravatar_id":"","url":"https://api.github.com/users/danielduhh","html_url":"https://github.com/danielduhh","followers_url":"https://api.github.com/users/danielduhh/followers","following_url":"https://api.github.com/users/danielduhh/following{/other_user}","gists_url":"https://api.github.com/users/danielduhh/gists{/gist_id}","starred_url":"https://api.github.com/users/danielduhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielduhh/subscriptions","organizations_url":"https://api.github.com/users/danielduhh/orgs","repos_url":"https://api.github.com/users/danielduhh/repos","events_url":"https://api.github.com/users/danielduhh/events{/privacy}","received_events_url":"https://api.github.com/users/danielduhh/received_events","type":"User","site_admin":false},"body":"The main goal of this PR is to improve the clarity of flags by classifying various cases of self-intersection.\r\n\r\n- Line features w/ building tags\r\n- Area features w/ duplicate Edges\r\n- Area features w/ invalid geometries \r\n- Roads w/ invalid geometries\r\n\r\nThis also removes all flags containing following tags Highway tags: _PROPOSED, CONSTRUCTION, FOOTWAY, PATH_, as well as all Waterway tags.","created_at":"2018-02-26T00:47:18Z","updated_at":"2018-03-22T23:50:20Z","closed_at":"2018-03-20T15:26:49Z","merged_at":"2018-03-20T15:26:49Z","merge_commit_sha":"dff2facbf42c0996898db4e3dbff09454cad837f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23/commits","review_comments_url":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23/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/23/comments","statuses_url":"https://api.github.com/repos/osmlab/atlas-checks/statuses/99581f6972c798b05fad4ab1be0d335a59132da7","head":{"label":"danielduhh:dev-upstream-rollback","ref":"dev-upstream-rollback","sha":"99581f6972c798b05fad4ab1be0d335a59132da7","user":{"login":"danielduhh","id":1947857,"avatar_url":"https://avatars0.githubusercontent.com/u/1947857?v=4","gravatar_id":"","url":"https://api.github.com/users/danielduhh","html_url":"https://github.com/danielduhh","followers_url":"https://api.github.com/users/danielduhh/followers","following_url":"https://api.github.com/users/danielduhh/following{/other_user}","gists_url":"https://api.github.com/users/danielduhh/gists{/gist_id}","starred_url":"https://api.github.com/users/danielduhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielduhh/subscriptions","organizations_url":"https://api.github.com/users/danielduhh/orgs","repos_url":"https://api.github.com/users/danielduhh/repos","events_url":"https://api.github.com/users/danielduhh/events{/privacy}","received_events_url":"https://api.github.com/users/danielduhh/received_events","type":"User","site_admin":false},"repo":{"id":117726676,"name":"atlas-checks","full_name":"danielduhh/atlas-checks","owner":{"login":"danielduhh","id":1947857,"avatar_url":"https://avatars0.githubusercontent.com/u/1947857?v=4","gravatar_id":"","url":"https://api.github.com/users/danielduhh","html_url":"https://github.com/danielduhh","followers_url":"https://api.github.com/users/danielduhh/followers","following_url":"https://api.github.com/users/danielduhh/following{/other_user}","gists_url":"https://api.github.com/users/danielduhh/gists{/gist_id}","starred_url":"https://api.github.com/users/danielduhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielduhh/subscriptions","organizations_url":"https://api.github.com/users/danielduhh/orgs","repos_url":"https://api.github.com/users/danielduhh/repos","events_url":"https://api.github.com/users/danielduhh/events{/privacy}","received_events_url":"https://api.github.com/users/danielduhh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielduhh/atlas-checks","description":"OSM data integrity checks with Atlas","fork":true,"url":"https://api.github.com/repos/danielduhh/atlas-checks","forks_url":"https://api.github.com/repos/danielduhh/atlas-checks/forks","keys_url":"https://api.github.com/repos/danielduhh/atlas-checks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielduhh/atlas-checks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielduhh/atlas-checks/teams","hooks_url":"https://api.github.com/repos/danielduhh/atlas-checks/hooks","issue_events_url":"https://api.github.com/repos/danielduhh/atlas-checks/issues/events{/number}","events_url":"https://api.github.com/repos/danielduhh/atlas-checks/events","assignees_url":"https://api.github.com/repos/danielduhh/atlas-checks/assignees{/user}","branches_url":"https://api.github.com/repos/danielduhh/atlas-checks/branches{/branch}","tags_url":"https://api.github.com/repos/danielduhh/atlas-checks/tags","blobs_url":"https://api.github.com/repos/danielduhh/atlas-checks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielduhh/atlas-checks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielduhh/atlas-checks/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielduhh/atlas-checks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielduhh/atlas-checks/statuses/{sha}","languages_url":"https://api.github.com/repos/danielduhh/atlas-checks/languages","stargazers_url":"https://api.github.com/repos/danielduhh/atlas-checks/stargazers","contributors_url":"https://api.github.com/repos/danielduhh/atlas-checks/contributors","subscribers_url":"https://api.github.com/repos/danielduhh/atlas-checks/subscribers","subscription_url":"https://api.github.com/repos/danielduhh/atlas-checks/subscription","commits_url":"https://api.github.com/repos/danielduhh/atlas-checks/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielduhh/atlas-checks/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielduhh/atlas-checks/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielduhh/atlas-checks/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielduhh/atlas-checks/contents/{+path}","compare_url":"https://api.github.com/repos/danielduhh/atlas-checks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielduhh/atlas-checks/merges","archive_url":"https://api.github.com/repos/danielduhh/atlas-checks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielduhh/atlas-checks/downloads","issues_url":"https://api.github.com/repos/danielduhh/atlas-checks/issues{/number}","pulls_url":"https://api.github.com/repos/danielduhh/atlas-checks/pulls{/number}","milestones_url":"https://api.github.com/repos/danielduhh/atlas-checks/milestones{/number}","notifications_url":"https://api.github.com/repos/danielduhh/atlas-checks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielduhh/atlas-checks/labels{/name}","releases_url":"https://api.github.com/repos/danielduhh/atlas-checks/releases{/id}","deployments_url":"https://api.github.com/repos/danielduhh/atlas-checks/deployments","created_at":"2018-01-16T18:52:10Z","updated_at":"2018-03-20T18:54:50Z","pushed_at":"2018-03-20T22:24:12Z","git_url":"git://github.com/danielduhh/atlas-checks.git","ssh_url":"git@github.com:danielduhh/atlas-checks.git","clone_url":"https://github.com/danielduhh/atlas-checks.git","svn_url":"https://github.com/danielduhh/atlas-checks","homepage":null,"size":12738,"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":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev-upstream"}},"base":{"label":"osmlab:dev","ref":"dev","sha":"c3d65d39d9e677e100891e95d4e2714a257e5de1","user":{"login":"osmlab","id":3856374,"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,"name":"atlas-checks","full_name":"osmlab/atlas-checks","owner":{"login":"osmlab","id":3856374,"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},"private":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-03-20T15:37:42Z","pushed_at":"2018-03-22T18:11:05Z","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":12715,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":11,"open_issues":2,"watchers":19,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23"},"html":{"href":"https://github.com/osmlab/atlas-checks/pull/23"},"issue":{"href":"https://api.github.com/repos/osmlab/atlas-checks/issues/23"},"comments":{"href":"https://api.github.com/repos/osmlab/atlas-checks/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/osmlab/atlas-checks/pulls/23/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/23/commits"},"statuses":{"href":"https://api.github.com/repos/osmlab/atlas-checks/statuses/99581f6972c798b05fad4ab1be0d335a59132da7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mertemin"}}