{"action":"created","comment":{"url":"https://api.github.com/repos/Turfjs/turf/pulls/comments/214016067","pull_request_review_id":150975965,"id":214016067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDAxNjA2Nw==","diff_hunk":"@@ -86,21 +86,19 @@ function doMultiPointAndLineStringCross(multiPoint, lineString) {\n }\n \n function doLineStringsCross(lineString1, lineString2) {\n-    var doLinesIntersect = lineIntersect(lineString1, lineString2);\n-    if (doLinesIntersect.features.length > 0) {\n-        for (var i = 0; i < lineString1.coordinates.length - 1; i++) {\n-            for (var i2 = 0; i2 < lineString2.coordinates.length - 1; i2++) {\n-                var incEndVertices = true;\n-                if (i2 === 0 || i2 === lineString2.coordinates.length - 2) {\n-                    incEndVertices = false;\n-                }\n-                if (isPointOnLineSegment(lineString1.coordinates[i], lineString1.coordinates[i + 1], lineString2.coordinates[i2], incEndVertices)) {\n-                    return true;\n-                }\n-            }\n-        }\n-    }\n-    return false;\n+    const intersections = lineIntersect(lineString1, lineString2);\n+\n+    const endpoints = [\n+        lineString1.coordinates[0], lineString1.coordinates[lineString1.coordinates.length - 1],\n+        lineString2.coordinates[0], lineString2.coordinates[lineString2.coordinates.length - 1]\n+    ]\n+\n+    // A line that touches another line should not cross\n+    var intersectionsWithoutEndpoints = intersections.features.filter(function (feature) {","path":"src/boolean-crosses/index.js","position":27,"original_position":27,"commit_id":"99a14f2384da486579ecaf6ec0e2f950d2cad7f5","original_commit_id":"99a14f2384da486579ecaf6ec0e2f950d2cad7f5","user":{"login":"rowanwins","id":6735870,"node_id":"MDQ6VXNlcjY3MzU4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/6735870?v=4","gravatar_id":"","url":"https://api.github.com/users/rowanwins","html_url":"https://github.com/rowanwins","followers_url":"https://api.github.com/users/rowanwins/followers","following_url":"https://api.github.com/users/rowanwins/following{/other_user}","gists_url":"https://api.github.com/users/rowanwins/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanwins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanwins/subscriptions","organizations_url":"https://api.github.com/users/rowanwins/orgs","repos_url":"https://api.github.com/users/rowanwins/repos","events_url":"https://api.github.com/users/rowanwins/events{/privacy}","received_events_url":"https://api.github.com/users/rowanwins/received_events","type":"User","site_admin":false},"body":"`filter` functions are generally quite slow @chriserickson (as are many of those es5 array functions like `forEach` and `map`) so generally we try to avoid them if possible.","created_at":"2018-08-30T12:47:51Z","updated_at":"2018-08-30T12:47:52Z","html_url":"https://github.com/Turfjs/turf/pull/1472#discussion_r214016067","pull_request_url":"https://api.github.com/repos/Turfjs/turf/pulls/1472","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/comments/214016067"},"html":{"href":"https://github.com/Turfjs/turf/pull/1472#discussion_r214016067"},"pull_request":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/1472"}}},"pull_request":{"url":"https://api.github.com/repos/Turfjs/turf/pulls/1472","id":212058443,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMDU4NDQz","html_url":"https://github.com/Turfjs/turf/pull/1472","diff_url":"https://github.com/Turfjs/turf/pull/1472.diff","patch_url":"https://github.com/Turfjs/turf/pull/1472.patch","issue_url":"https://api.github.com/repos/Turfjs/turf/issues/1472","number":1472,"state":"open","locked":false,"title":"Issue-1469: Fixes incorrect implementation for line crosses line","user":{"login":"chriserickson","id":1971519,"node_id":"MDQ6VXNlcjE5NzE1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1971519?v=4","gravatar_id":"","url":"https://api.github.com/users/chriserickson","html_url":"https://github.com/chriserickson","followers_url":"https://api.github.com/users/chriserickson/followers","following_url":"https://api.github.com/users/chriserickson/following{/other_user}","gists_url":"https://api.github.com/users/chriserickson/gists{/gist_id}","starred_url":"https://api.github.com/users/chriserickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriserickson/subscriptions","organizations_url":"https://api.github.com/users/chriserickson/orgs","repos_url":"https://api.github.com/users/chriserickson/repos","events_url":"https://api.github.com/users/chriserickson/events{/privacy}","received_events_url":"https://api.github.com/users/chriserickson/received_events","type":"User","site_admin":false},"body":"This fixes Issue-1469, where booleanCrosses did not correctly identify two lines which cross. This was due to some overly aggressive checking for endpoint-on-line, which I re-implemented.\r\n","created_at":"2018-08-30T12:17:09Z","updated_at":"2018-08-30T12:47:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3998d51c1144cb1092fdfb7edc5e01e12b83346","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Turfjs/turf/pulls/1472/commits","review_comments_url":"https://api.github.com/repos/Turfjs/turf/pulls/1472/comments","review_comment_url":"https://api.github.com/repos/Turfjs/turf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Turfjs/turf/issues/1472/comments","statuses_url":"https://api.github.com/repos/Turfjs/turf/statuses/99a14f2384da486579ecaf6ec0e2f950d2cad7f5","head":{"label":"chriserickson:bugfix/1469","ref":"bugfix/1469","sha":"99a14f2384da486579ecaf6ec0e2f950d2cad7f5","user":{"login":"chriserickson","id":1971519,"node_id":"MDQ6VXNlcjE5NzE1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1971519?v=4","gravatar_id":"","url":"https://api.github.com/users/chriserickson","html_url":"https://github.com/chriserickson","followers_url":"https://api.github.com/users/chriserickson/followers","following_url":"https://api.github.com/users/chriserickson/following{/other_user}","gists_url":"https://api.github.com/users/chriserickson/gists{/gist_id}","starred_url":"https://api.github.com/users/chriserickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriserickson/subscriptions","organizations_url":"https://api.github.com/users/chriserickson/orgs","repos_url":"https://api.github.com/users/chriserickson/repos","events_url":"https://api.github.com/users/chriserickson/events{/privacy}","received_events_url":"https://api.github.com/users/chriserickson/received_events","type":"User","site_admin":false},"repo":{"id":146307488,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMDc0ODg=","name":"turf","full_name":"chriserickson/turf","owner":{"login":"chriserickson","id":1971519,"node_id":"MDQ6VXNlcjE5NzE1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1971519?v=4","gravatar_id":"","url":"https://api.github.com/users/chriserickson","html_url":"https://github.com/chriserickson","followers_url":"https://api.github.com/users/chriserickson/followers","following_url":"https://api.github.com/users/chriserickson/following{/other_user}","gists_url":"https://api.github.com/users/chriserickson/gists{/gist_id}","starred_url":"https://api.github.com/users/chriserickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriserickson/subscriptions","organizations_url":"https://api.github.com/users/chriserickson/orgs","repos_url":"https://api.github.com/users/chriserickson/repos","events_url":"https://api.github.com/users/chriserickson/events{/privacy}","received_events_url":"https://api.github.com/users/chriserickson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chriserickson/turf","description":"A modular geospatial engine written in JavaScript","fork":true,"url":"https://api.github.com/repos/chriserickson/turf","forks_url":"https://api.github.com/repos/chriserickson/turf/forks","keys_url":"https://api.github.com/repos/chriserickson/turf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chriserickson/turf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chriserickson/turf/teams","hooks_url":"https://api.github.com/repos/chriserickson/turf/hooks","issue_events_url":"https://api.github.com/repos/chriserickson/turf/issues/events{/number}","events_url":"https://api.github.com/repos/chriserickson/turf/events","assignees_url":"https://api.github.com/repos/chriserickson/turf/assignees{/user}","branches_url":"https://api.github.com/repos/chriserickson/turf/branches{/branch}","tags_url":"https://api.github.com/repos/chriserickson/turf/tags","blobs_url":"https://api.github.com/repos/chriserickson/turf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chriserickson/turf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chriserickson/turf/git/refs{/sha}","trees_url":"https://api.github.com/repos/chriserickson/turf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chriserickson/turf/statuses/{sha}","languages_url":"https://api.github.com/repos/chriserickson/turf/languages","stargazers_url":"https://api.github.com/repos/chriserickson/turf/stargazers","contributors_url":"https://api.github.com/repos/chriserickson/turf/contributors","subscribers_url":"https://api.github.com/repos/chriserickson/turf/subscribers","subscription_url":"https://api.github.com/repos/chriserickson/turf/subscription","commits_url":"https://api.github.com/repos/chriserickson/turf/commits{/sha}","git_commits_url":"https://api.github.com/repos/chriserickson/turf/git/commits{/sha}","comments_url":"https://api.github.com/repos/chriserickson/turf/comments{/number}","issue_comment_url":"https://api.github.com/repos/chriserickson/turf/issues/comments{/number}","contents_url":"https://api.github.com/repos/chriserickson/turf/contents/{+path}","compare_url":"https://api.github.com/repos/chriserickson/turf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chriserickson/turf/merges","archive_url":"https://api.github.com/repos/chriserickson/turf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chriserickson/turf/downloads","issues_url":"https://api.github.com/repos/chriserickson/turf/issues{/number}","pulls_url":"https://api.github.com/repos/chriserickson/turf/pulls{/number}","milestones_url":"https://api.github.com/repos/chriserickson/turf/milestones{/number}","notifications_url":"https://api.github.com/repos/chriserickson/turf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chriserickson/turf/labels{/name}","releases_url":"https://api.github.com/repos/chriserickson/turf/releases{/id}","deployments_url":"https://api.github.com/repos/chriserickson/turf/deployments","created_at":"2018-08-27T14:17:07Z","updated_at":"2018-08-27T14:17:12Z","pushed_at":"2018-08-30T12:18:16Z","git_url":"git://github.com/chriserickson/turf.git","ssh_url":"git@github.com:chriserickson/turf.git","clone_url":"https://github.com/chriserickson/turf.git","svn_url":"https://github.com/chriserickson/turf","homepage":"http://turfjs.org/","size":41272,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Turfjs:v7","ref":"v7","sha":"538bdb51cdc328eb8fd497820ee65840903d5215","user":{"login":"Turfjs","id":7736769,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MzY3Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/7736769?v=4","gravatar_id":"","url":"https://api.github.com/users/Turfjs","html_url":"https://github.com/Turfjs","followers_url":"https://api.github.com/users/Turfjs/followers","following_url":"https://api.github.com/users/Turfjs/following{/other_user}","gists_url":"https://api.github.com/users/Turfjs/gists{/gist_id}","starred_url":"https://api.github.com/users/Turfjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Turfjs/subscriptions","organizations_url":"https://api.github.com/users/Turfjs/orgs","repos_url":"https://api.github.com/users/Turfjs/repos","events_url":"https://api.github.com/users/Turfjs/events{/privacy}","received_events_url":"https://api.github.com/users/Turfjs/received_events","type":"Organization","site_admin":false},"repo":{"id":13301038,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMwMTAzOA==","name":"turf","full_name":"Turfjs/turf","owner":{"login":"Turfjs","id":7736769,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MzY3Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/7736769?v=4","gravatar_id":"","url":"https://api.github.com/users/Turfjs","html_url":"https://github.com/Turfjs","followers_url":"https://api.github.com/users/Turfjs/followers","following_url":"https://api.github.com/users/Turfjs/following{/other_user}","gists_url":"https://api.github.com/users/Turfjs/gists{/gist_id}","starred_url":"https://api.github.com/users/Turfjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Turfjs/subscriptions","organizations_url":"https://api.github.com/users/Turfjs/orgs","repos_url":"https://api.github.com/users/Turfjs/repos","events_url":"https://api.github.com/users/Turfjs/events{/privacy}","received_events_url":"https://api.github.com/users/Turfjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Turfjs/turf","description":"A modular geospatial engine written in JavaScript","fork":false,"url":"https://api.github.com/repos/Turfjs/turf","forks_url":"https://api.github.com/repos/Turfjs/turf/forks","keys_url":"https://api.github.com/repos/Turfjs/turf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Turfjs/turf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Turfjs/turf/teams","hooks_url":"https://api.github.com/repos/Turfjs/turf/hooks","issue_events_url":"https://api.github.com/repos/Turfjs/turf/issues/events{/number}","events_url":"https://api.github.com/repos/Turfjs/turf/events","assignees_url":"https://api.github.com/repos/Turfjs/turf/assignees{/user}","branches_url":"https://api.github.com/repos/Turfjs/turf/branches{/branch}","tags_url":"https://api.github.com/repos/Turfjs/turf/tags","blobs_url":"https://api.github.com/repos/Turfjs/turf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Turfjs/turf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Turfjs/turf/git/refs{/sha}","trees_url":"https://api.github.com/repos/Turfjs/turf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Turfjs/turf/statuses/{sha}","languages_url":"https://api.github.com/repos/Turfjs/turf/languages","stargazers_url":"https://api.github.com/repos/Turfjs/turf/stargazers","contributors_url":"https://api.github.com/repos/Turfjs/turf/contributors","subscribers_url":"https://api.github.com/repos/Turfjs/turf/subscribers","subscription_url":"https://api.github.com/repos/Turfjs/turf/subscription","commits_url":"https://api.github.com/repos/Turfjs/turf/commits{/sha}","git_commits_url":"https://api.github.com/repos/Turfjs/turf/git/commits{/sha}","comments_url":"https://api.github.com/repos/Turfjs/turf/comments{/number}","issue_comment_url":"https://api.github.com/repos/Turfjs/turf/issues/comments{/number}","contents_url":"https://api.github.com/repos/Turfjs/turf/contents/{+path}","compare_url":"https://api.github.com/repos/Turfjs/turf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Turfjs/turf/merges","archive_url":"https://api.github.com/repos/Turfjs/turf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Turfjs/turf/downloads","issues_url":"https://api.github.com/repos/Turfjs/turf/issues{/number}","pulls_url":"https://api.github.com/repos/Turfjs/turf/pulls{/number}","milestones_url":"https://api.github.com/repos/Turfjs/turf/milestones{/number}","notifications_url":"https://api.github.com/repos/Turfjs/turf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Turfjs/turf/labels{/name}","releases_url":"https://api.github.com/repos/Turfjs/turf/releases{/id}","deployments_url":"https://api.github.com/repos/Turfjs/turf/deployments","created_at":"2013-10-03T14:50:25Z","updated_at":"2018-08-30T12:41:47Z","pushed_at":"2018-08-30T12:18:17Z","git_url":"git://github.com/Turfjs/turf.git","ssh_url":"git@github.com:Turfjs/turf.git","clone_url":"https://github.com/Turfjs/turf.git","svn_url":"https://github.com/Turfjs/turf","homepage":"http://turfjs.org/","size":41268,"stargazers_count":3818,"watchers_count":3818,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":399,"mirror_url":null,"archived":false,"open_issues_count":119,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":399,"open_issues":119,"watchers":3818,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/1472"},"html":{"href":"https://github.com/Turfjs/turf/pull/1472"},"issue":{"href":"https://api.github.com/repos/Turfjs/turf/issues/1472"},"comments":{"href":"https://api.github.com/repos/Turfjs/turf/issues/1472/comments"},"review_comments":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/1472/comments"},"review_comment":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Turfjs/turf/pulls/1472/commits"},"statuses":{"href":"https://api.github.com/repos/Turfjs/turf/statuses/99a14f2384da486579ecaf6ec0e2f950d2cad7f5"}},"author_association":"NONE"}}
{"actor":{"display_login":"rowanwins"}}