{"action":"created","comment":{"url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/comments/66549896","id":66549896,"diff_hunk":"@@ -378,46 +369,24 @@ function filter_tags_relation_member (keyvalues, keyvaluemembers, roles, memberc\n    return filter, keyvalues, membersuperseded, linestring, polygon, roads\n end\n \n--- Check if an object with given tags should be treated as polygon\n-function haspolygontags (tags)\n-   -- Treat objects tagged as area=yes, area=1, or area=true as polygon,\n-   -- and treat objects tagged as area=no, area=0, or area=false not as polygon\n-   if ((tags[\"area\"] == \"yes\") or (tags[\"area\"] == \"1\") or (tags[\"area\"] == \"true\")) then\n-      return 1\n-   elseif ((tags[\"area\"] == \"no\") or (tags[\"area\"] == \"0\") or (tags[\"area\"] == \"false\")) then\n-      return 0\n-   end\n-\n-   -- Treat objects with a key in polygon_keys as polygon\n-   local haspolytags = 0\n-   for i,k in ipairs(polygon_keys) do\n-      if tags[k] then\n-         local polygontag = 1\n-         -- However, if the key/value combination occurs in linestring_values, do not treat the object as polygon\n-         for index,tag in pairs(linestring_values) do\n-            if k == tag[1] and tags[k] == tag[2] then\n-               polygontag = 0\n-               break\n-            end\n-         end\n-         if polygontag == 1 then\n-            haspolytags = 1\n-            break\n-         end\n-      end\n+--- Check if an object with given tags should be treated as polygon\n+-- @param tags OSM tags\n+-- @return 1 if area, 0 if linear\n+function isarea (tags)\n+   -- Treat objects tagged as area=yes polygon, other area as no\n+   if tags[\"area\"] then\n+      return tags[\"area\"] == \"yes\" and 1 or 0\n    end\n \n-   -- Treat objects with a key/value combination in polygon_values as polygon\n-   if haspolytags == 0 then\n-      for index,tag in pairs(polygon_values) do\n-         if tags[tag[1]] == tag[2] then\n-            haspolytags = 1\n-            break\n-         end\n+   -- Search through object's tags\n+   for k, v in pairs(tags) do\n+      -- Check if it has a polygon key and not a linestring override, or a polygon k=v\n+      if (polygon_keys[k] and not (linestring_values[k] and linestring_values[k][v])) or","path":"openstreetmap-carto.lua","position":129,"original_position":129,"commit_id":"10bff06c71f4707f1c312e4f98cd41e9d4d3e0cb","original_commit_id":"10bff06c71f4707f1c312e4f98cd41e9d4d3e0cb","user":{"login":"pnorman","id":1190866,"avatar_url":"https://avatars.githubusercontent.com/u/1190866?v=3","gravatar_id":"","url":"https://api.github.com/users/pnorman","html_url":"https://github.com/pnorman","followers_url":"https://api.github.com/users/pnorman/followers","following_url":"https://api.github.com/users/pnorman/following{/other_user}","gists_url":"https://api.github.com/users/pnorman/gists{/gist_id}","starred_url":"https://api.github.com/users/pnorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnorman/subscriptions","organizations_url":"https://api.github.com/users/pnorman/orgs","repos_url":"https://api.github.com/users/pnorman/repos","events_url":"https://api.github.com/users/pnorman/events{/privacy}","received_events_url":"https://api.github.com/users/pnorman/received_events","type":"User","site_admin":false},"body":"Haven't had a chance to code, but I think you're right","created_at":"2016-06-10T01:31:01Z","updated_at":"2016-06-10T01:31:02Z","html_url":"https://github.com/math1985/openstreetmap-carto/pull/8#discussion_r66549896","pull_request_url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/comments/66549896"},"html":{"href":"https://github.com/math1985/openstreetmap-carto/pull/8#discussion_r66549896"},"pull_request":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8","id":72312545,"html_url":"https://github.com/math1985/openstreetmap-carto/pull/8","diff_url":"https://github.com/math1985/openstreetmap-carto/pull/8.diff","patch_url":"https://github.com/math1985/openstreetmap-carto/pull/8.patch","issue_url":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/8","number":8,"state":"open","locked":false,"title":"area function improvements","user":{"login":"pnorman","id":1190866,"avatar_url":"https://avatars.githubusercontent.com/u/1190866?v=3","gravatar_id":"","url":"https://api.github.com/users/pnorman","html_url":"https://github.com/pnorman","followers_url":"https://api.github.com/users/pnorman/followers","following_url":"https://api.github.com/users/pnorman/following{/other_user}","gists_url":"https://api.github.com/users/pnorman/gists{/gist_id}","starred_url":"https://api.github.com/users/pnorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnorman/subscriptions","organizations_url":"https://api.github.com/users/pnorman/orgs","repos_url":"https://api.github.com/users/pnorman/repos","events_url":"https://api.github.com/users/pnorman/events{/privacy}","received_events_url":"https://api.github.com/users/pnorman/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-02T09:12:32Z","updated_at":"2016-06-10T01:31:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d59be64999a6215e11bcfabb30cc1442de5fed7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8/commits","review_comments_url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8/comments","review_comment_url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/8/comments","statuses_url":"https://api.github.com/repos/math1985/openstreetmap-carto/statuses/10bff06c71f4707f1c312e4f98cd41e9d4d3e0cb","head":{"label":"pnorman:isarea","ref":"isarea","sha":"10bff06c71f4707f1c312e4f98cd41e9d4d3e0cb","user":{"login":"pnorman","id":1190866,"avatar_url":"https://avatars.githubusercontent.com/u/1190866?v=3","gravatar_id":"","url":"https://api.github.com/users/pnorman","html_url":"https://github.com/pnorman","followers_url":"https://api.github.com/users/pnorman/followers","following_url":"https://api.github.com/users/pnorman/following{/other_user}","gists_url":"https://api.github.com/users/pnorman/gists{/gist_id}","starred_url":"https://api.github.com/users/pnorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnorman/subscriptions","organizations_url":"https://api.github.com/users/pnorman/orgs","repos_url":"https://api.github.com/users/pnorman/repos","events_url":"https://api.github.com/users/pnorman/events{/privacy}","received_events_url":"https://api.github.com/users/pnorman/received_events","type":"User","site_admin":false},"repo":{"id":10091378,"name":"openstreetmap-carto","full_name":"pnorman/openstreetmap-carto","owner":{"login":"pnorman","id":1190866,"avatar_url":"https://avatars.githubusercontent.com/u/1190866?v=3","gravatar_id":"","url":"https://api.github.com/users/pnorman","html_url":"https://github.com/pnorman","followers_url":"https://api.github.com/users/pnorman/followers","following_url":"https://api.github.com/users/pnorman/following{/other_user}","gists_url":"https://api.github.com/users/pnorman/gists{/gist_id}","starred_url":"https://api.github.com/users/pnorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnorman/subscriptions","organizations_url":"https://api.github.com/users/pnorman/orgs","repos_url":"https://api.github.com/users/pnorman/repos","events_url":"https://api.github.com/users/pnorman/events{/privacy}","received_events_url":"https://api.github.com/users/pnorman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pnorman/openstreetmap-carto","description":"A project to re-implement the standard OpenStreetMap mapnik style, in CartoCSS","fork":true,"url":"https://api.github.com/repos/pnorman/openstreetmap-carto","forks_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/forks","keys_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/teams","hooks_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/hooks","issue_events_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/issues/events{/number}","events_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/events","assignees_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/assignees{/user}","branches_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/branches{/branch}","tags_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/tags","blobs_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/git/refs{/sha}","trees_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/statuses/{sha}","languages_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/languages","stargazers_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/stargazers","contributors_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/contributors","subscribers_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/subscribers","subscription_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/subscription","commits_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/commits{/sha}","git_commits_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/git/commits{/sha}","comments_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/comments{/number}","issue_comment_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/issues/comments{/number}","contents_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/contents/{+path}","compare_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/merges","archive_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/downloads","issues_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/issues{/number}","pulls_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/pulls{/number}","milestones_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/milestones{/number}","notifications_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/labels{/name}","releases_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/releases{/id}","deployments_url":"https://api.github.com/repos/pnorman/openstreetmap-carto/deployments","created_at":"2013-05-16T01:30:02Z","updated_at":"2015-03-19T23:06:38Z","pushed_at":"2016-06-02T09:02:29Z","git_url":"git://github.com/pnorman/openstreetmap-carto.git","ssh_url":"git@github.com:pnorman/openstreetmap-carto.git","clone_url":"https://github.com/pnorman/openstreetmap-carto.git","svn_url":"https://github.com/pnorman/openstreetmap-carto","homepage":null,"size":7106,"stargazers_count":1,"watchers_count":1,"language":"CartoCSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"math1985:lua_changes","ref":"lua_changes","sha":"ae3f38ebc171453c67688e76cdb67c1c7f390abc","user":{"login":"math1985","id":5251909,"avatar_url":"https://avatars.githubusercontent.com/u/5251909?v=3","gravatar_id":"","url":"https://api.github.com/users/math1985","html_url":"https://github.com/math1985","followers_url":"https://api.github.com/users/math1985/followers","following_url":"https://api.github.com/users/math1985/following{/other_user}","gists_url":"https://api.github.com/users/math1985/gists{/gist_id}","starred_url":"https://api.github.com/users/math1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/math1985/subscriptions","organizations_url":"https://api.github.com/users/math1985/orgs","repos_url":"https://api.github.com/users/math1985/repos","events_url":"https://api.github.com/users/math1985/events{/privacy}","received_events_url":"https://api.github.com/users/math1985/received_events","type":"User","site_admin":false},"repo":{"id":12184725,"name":"openstreetmap-carto","full_name":"math1985/openstreetmap-carto","owner":{"login":"math1985","id":5251909,"avatar_url":"https://avatars.githubusercontent.com/u/5251909?v=3","gravatar_id":"","url":"https://api.github.com/users/math1985","html_url":"https://github.com/math1985","followers_url":"https://api.github.com/users/math1985/followers","following_url":"https://api.github.com/users/math1985/following{/other_user}","gists_url":"https://api.github.com/users/math1985/gists{/gist_id}","starred_url":"https://api.github.com/users/math1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/math1985/subscriptions","organizations_url":"https://api.github.com/users/math1985/orgs","repos_url":"https://api.github.com/users/math1985/repos","events_url":"https://api.github.com/users/math1985/events{/privacy}","received_events_url":"https://api.github.com/users/math1985/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/math1985/openstreetmap-carto","description":"A project to re-implement the standard OpenStreetMap mapnik style, in CartoCSS","fork":true,"url":"https://api.github.com/repos/math1985/openstreetmap-carto","forks_url":"https://api.github.com/repos/math1985/openstreetmap-carto/forks","keys_url":"https://api.github.com/repos/math1985/openstreetmap-carto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/math1985/openstreetmap-carto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/math1985/openstreetmap-carto/teams","hooks_url":"https://api.github.com/repos/math1985/openstreetmap-carto/hooks","issue_events_url":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/events{/number}","events_url":"https://api.github.com/repos/math1985/openstreetmap-carto/events","assignees_url":"https://api.github.com/repos/math1985/openstreetmap-carto/assignees{/user}","branches_url":"https://api.github.com/repos/math1985/openstreetmap-carto/branches{/branch}","tags_url":"https://api.github.com/repos/math1985/openstreetmap-carto/tags","blobs_url":"https://api.github.com/repos/math1985/openstreetmap-carto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/math1985/openstreetmap-carto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/math1985/openstreetmap-carto/git/refs{/sha}","trees_url":"https://api.github.com/repos/math1985/openstreetmap-carto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/math1985/openstreetmap-carto/statuses/{sha}","languages_url":"https://api.github.com/repos/math1985/openstreetmap-carto/languages","stargazers_url":"https://api.github.com/repos/math1985/openstreetmap-carto/stargazers","contributors_url":"https://api.github.com/repos/math1985/openstreetmap-carto/contributors","subscribers_url":"https://api.github.com/repos/math1985/openstreetmap-carto/subscribers","subscription_url":"https://api.github.com/repos/math1985/openstreetmap-carto/subscription","commits_url":"https://api.github.com/repos/math1985/openstreetmap-carto/commits{/sha}","git_commits_url":"https://api.github.com/repos/math1985/openstreetmap-carto/git/commits{/sha}","comments_url":"https://api.github.com/repos/math1985/openstreetmap-carto/comments{/number}","issue_comment_url":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/comments{/number}","contents_url":"https://api.github.com/repos/math1985/openstreetmap-carto/contents/{+path}","compare_url":"https://api.github.com/repos/math1985/openstreetmap-carto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/math1985/openstreetmap-carto/merges","archive_url":"https://api.github.com/repos/math1985/openstreetmap-carto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/math1985/openstreetmap-carto/downloads","issues_url":"https://api.github.com/repos/math1985/openstreetmap-carto/issues{/number}","pulls_url":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls{/number}","milestones_url":"https://api.github.com/repos/math1985/openstreetmap-carto/milestones{/number}","notifications_url":"https://api.github.com/repos/math1985/openstreetmap-carto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/math1985/openstreetmap-carto/labels{/name}","releases_url":"https://api.github.com/repos/math1985/openstreetmap-carto/releases{/id}","deployments_url":"https://api.github.com/repos/math1985/openstreetmap-carto/deployments","created_at":"2013-08-17T19:53:56Z","updated_at":"2015-05-05T12:25:55Z","pushed_at":"2016-06-10T00:10:57Z","git_url":"git://github.com/math1985/openstreetmap-carto.git","ssh_url":"git@github.com:math1985/openstreetmap-carto.git","clone_url":"https://github.com/math1985/openstreetmap-carto.git","svn_url":"https://github.com/math1985/openstreetmap-carto","homepage":null,"size":7045,"stargazers_count":1,"watchers_count":1,"language":"CartoCSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8"},"html":{"href":"https://github.com/math1985/openstreetmap-carto/pull/8"},"issue":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/8"},"comments":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/math1985/openstreetmap-carto/statuses/10bff06c71f4707f1c312e4f98cd41e9d4d3e0cb"}}}}
{"actor":{"display_login":"pnorman"}}