{"action":"created","comment":{"url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/comments/43874443","id":43874443,"diff_hunk":"@@ -11,3 +12,13 @@ CREATE TABLE wof_neighbourhood (\n CREATE INDEX wof_neighbourhood_wof_id_index ON wof_neighbourhood(wof_id);\n CREATE INDEX wof_neighbourhood_label_position_index ON wof_neighbourhood USING GIST(label_position);\n CREATE INDEX wof_neighbourhood_geometry_index ON wof_neighbourhood USING GIST(geometry);\n+\n+CREATE TABLE wof_neighbourhood_placetype (\n+  placetype_code SMALLINT UNIQUE NOT NULL,","path":"data/wof-schema.sql","position":14,"original_position":14,"commit_id":"550a2bcf0aec7750b803e27a6d175b39878dbbcd","original_commit_id":"550a2bcf0aec7750b803e27a6d175b39878dbbcd","user":{"login":"zerebubuth","id":271360,"avatar_url":"https://avatars.githubusercontent.com/u/271360?v=3","gravatar_id":"","url":"https://api.github.com/users/zerebubuth","html_url":"https://github.com/zerebubuth","followers_url":"https://api.github.com/users/zerebubuth/followers","following_url":"https://api.github.com/users/zerebubuth/following{/other_user}","gists_url":"https://api.github.com/users/zerebubuth/gists{/gist_id}","starred_url":"https://api.github.com/users/zerebubuth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerebubuth/subscriptions","organizations_url":"https://api.github.com/users/zerebubuth/orgs","repos_url":"https://api.github.com/users/zerebubuth/repos","events_url":"https://api.github.com/users/zerebubuth/events{/privacy}","received_events_url":"https://api.github.com/users/zerebubuth/received_events","type":"User","site_admin":false},"body":"Can we spell `UNIQUE NOT NULL` as `PRIMARY KEY`?","created_at":"2015-11-04T12:26:28Z","updated_at":"2015-11-04T12:26:28Z","html_url":"https://github.com/mapzen/vector-datasource/pull/380#discussion_r43874443","pull_request_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/comments/43874443"},"html":{"href":"https://github.com/mapzen/vector-datasource/pull/380#discussion_r43874443"},"pull_request":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380","id":49622066,"html_url":"https://github.com/mapzen/vector-datasource/pull/380","diff_url":"https://github.com/mapzen/vector-datasource/pull/380.diff","patch_url":"https://github.com/mapzen/vector-datasource/pull/380.patch","issue_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/380","number":380,"state":"open","locked":false,"title":"Update WOF places layer","user":{"login":"rmarianski","id":53770,"avatar_url":"https://avatars.githubusercontent.com/u/53770?v=3","gravatar_id":"","url":"https://api.github.com/users/rmarianski","html_url":"https://github.com/rmarianski","followers_url":"https://api.github.com/users/rmarianski/followers","following_url":"https://api.github.com/users/rmarianski/following{/other_user}","gists_url":"https://api.github.com/users/rmarianski/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarianski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarianski/subscriptions","organizations_url":"https://api.github.com/users/rmarianski/orgs","repos_url":"https://api.github.com/users/rmarianski/repos","events_url":"https://api.github.com/users/rmarianski/events{/privacy}","received_events_url":"https://api.github.com/users/rmarianski/received_events","type":"User","site_admin":false},"body":"* Depends on https://github.com/mapzen/vector-datasource/pull/379 (first commit in this pr is shared with that pr)\n* Connects with https://github.com/mapzen/TileStache/pull/91\n* Refs:\n  - https://github.com/mapzen/vector-datasource/issues/337\n  - https://github.com/mapzen/vector-datasource/issues/338\n  - https://github.com/mapzen/vector-datasource/issues/359\n\nThis pr boils down to:\n\n* `kind_tile_rank` is used as the property that can be used in the stylesheet to determine importance, and is present on WOF features.\n* `n_photos` and `area` are also included in the properties for WOF features, which may be useful for testing in the interim. Both can be easily removed.\n* WOF neighbourhoods are included at z11 now.\n* OSM neighbourhoods are no longer included.\n\nImplementation notes:\n\n* The area column is pre-computed in the process that inserts the WOF data into the database. It seemed like a better approach to just query for these values rather than include a separate column in the query to return back another geometry (the label point counts as the geometry we use for display), with which we would only compute the area anyway. If we need to start doing other things with the raw geometry during processing, I think we can revisit this decision. Otherwise I think relatively speaking we'll pay for the IO without much gain. Alternatively we could just call `ST_Area` at query time, but because we'll be querying much more than writing, this seemed like a reasonable trade-off.\n* I added a \"lookup\" table from placetype code -> string. Placetypes are stored as integers as an optimization, and they represent whether the feature is a microhood, macrohood, or neighbourhood. We could also just have a `case` statement in the query instead of doing this join at query time, or we could have a transform take care of it, which might centralize this logic more. Not sure if that would actually save any time though, but it might be better to maintain that way.\n* There are additional changes forthcoming, like adding `min_zoom` that we will start picking up from WOF, but I figured that we might be better off tackling those in a separate pr.\n\n@zerebubuth, @nvkelso: could you review please?","created_at":"2015-11-03T22:30:24Z","updated_at":"2015-11-04T12:26:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa060f147632b545989921924530d79eac3d0173","assignee":{"login":"zerebubuth","id":271360,"avatar_url":"https://avatars.githubusercontent.com/u/271360?v=3","gravatar_id":"","url":"https://api.github.com/users/zerebubuth","html_url":"https://github.com/zerebubuth","followers_url":"https://api.github.com/users/zerebubuth/followers","following_url":"https://api.github.com/users/zerebubuth/following{/other_user}","gists_url":"https://api.github.com/users/zerebubuth/gists{/gist_id}","starred_url":"https://api.github.com/users/zerebubuth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerebubuth/subscriptions","organizations_url":"https://api.github.com/users/zerebubuth/orgs","repos_url":"https://api.github.com/users/zerebubuth/repos","events_url":"https://api.github.com/users/zerebubuth/events{/privacy}","received_events_url":"https://api.github.com/users/zerebubuth/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapzen/vector-datasource/milestones/4","html_url":"https://github.com/mapzen/vector-datasource/milestones/v0.5.0","labels_url":"https://api.github.com/repos/mapzen/vector-datasource/milestones/4/labels","id":1386307,"number":4,"title":"v0.5.0","description":"","creator":{"login":"nvkelso","id":853051,"avatar_url":"https://avatars.githubusercontent.com/u/853051?v=3","gravatar_id":"","url":"https://api.github.com/users/nvkelso","html_url":"https://github.com/nvkelso","followers_url":"https://api.github.com/users/nvkelso/followers","following_url":"https://api.github.com/users/nvkelso/following{/other_user}","gists_url":"https://api.github.com/users/nvkelso/gists{/gist_id}","starred_url":"https://api.github.com/users/nvkelso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvkelso/subscriptions","organizations_url":"https://api.github.com/users/nvkelso/orgs","repos_url":"https://api.github.com/users/nvkelso/repos","events_url":"https://api.github.com/users/nvkelso/events{/privacy}","received_events_url":"https://api.github.com/users/nvkelso/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":26,"state":"open","created_at":"2015-10-30T22:45:36Z","updated_at":"2015-11-04T04:03:30Z","due_on":"2015-11-04T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380/commits","review_comments_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380/comments","review_comment_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/380/comments","statuses_url":"https://api.github.com/repos/mapzen/vector-datasource/statuses/550a2bcf0aec7750b803e27a6d175b39878dbbcd","head":{"label":"mapzen:update-wof-places","ref":"update-wof-places","sha":"550a2bcf0aec7750b803e27a6d175b39878dbbcd","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":13446739,"name":"vector-datasource","full_name":"mapzen/vector-datasource","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/vector-datasource","description":"Mapzen vector tile service - OpenStreetMap vector tiles in several formats","fork":false,"url":"https://api.github.com/repos/mapzen/vector-datasource","forks_url":"https://api.github.com/repos/mapzen/vector-datasource/forks","keys_url":"https://api.github.com/repos/mapzen/vector-datasource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/vector-datasource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/vector-datasource/teams","hooks_url":"https://api.github.com/repos/mapzen/vector-datasource/hooks","issue_events_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/vector-datasource/events","assignees_url":"https://api.github.com/repos/mapzen/vector-datasource/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/vector-datasource/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/vector-datasource/tags","blobs_url":"https://api.github.com/repos/mapzen/vector-datasource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/vector-datasource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/vector-datasource/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/vector-datasource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/vector-datasource/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/vector-datasource/languages","stargazers_url":"https://api.github.com/repos/mapzen/vector-datasource/stargazers","contributors_url":"https://api.github.com/repos/mapzen/vector-datasource/contributors","subscribers_url":"https://api.github.com/repos/mapzen/vector-datasource/subscribers","subscription_url":"https://api.github.com/repos/mapzen/vector-datasource/subscription","commits_url":"https://api.github.com/repos/mapzen/vector-datasource/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/vector-datasource/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/vector-datasource/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/vector-datasource/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/vector-datasource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/vector-datasource/merges","archive_url":"https://api.github.com/repos/mapzen/vector-datasource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/vector-datasource/downloads","issues_url":"https://api.github.com/repos/mapzen/vector-datasource/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/vector-datasource/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/vector-datasource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/vector-datasource/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/vector-datasource/releases{/id}","created_at":"2013-10-09T15:54:45Z","updated_at":"2015-11-01T12:46:02Z","pushed_at":"2015-11-03T22:30:25Z","git_url":"git://github.com/mapzen/vector-datasource.git","ssh_url":"git@github.com:mapzen/vector-datasource.git","clone_url":"https://github.com/mapzen/vector-datasource.git","svn_url":"https://github.com/mapzen/vector-datasource","homepage":"http://mapzen.com/vector","size":72434,"stargazers_count":177,"watchers_count":177,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":109,"forks":40,"open_issues":109,"watchers":177,"default_branch":"master"}},"base":{"label":"mapzen:master","ref":"master","sha":"91d73cb3a60f0626c2117380dd05dd4d029c4146","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":13446739,"name":"vector-datasource","full_name":"mapzen/vector-datasource","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/vector-datasource","description":"Mapzen vector tile service - OpenStreetMap vector tiles in several formats","fork":false,"url":"https://api.github.com/repos/mapzen/vector-datasource","forks_url":"https://api.github.com/repos/mapzen/vector-datasource/forks","keys_url":"https://api.github.com/repos/mapzen/vector-datasource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/vector-datasource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/vector-datasource/teams","hooks_url":"https://api.github.com/repos/mapzen/vector-datasource/hooks","issue_events_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/vector-datasource/events","assignees_url":"https://api.github.com/repos/mapzen/vector-datasource/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/vector-datasource/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/vector-datasource/tags","blobs_url":"https://api.github.com/repos/mapzen/vector-datasource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/vector-datasource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/vector-datasource/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/vector-datasource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/vector-datasource/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/vector-datasource/languages","stargazers_url":"https://api.github.com/repos/mapzen/vector-datasource/stargazers","contributors_url":"https://api.github.com/repos/mapzen/vector-datasource/contributors","subscribers_url":"https://api.github.com/repos/mapzen/vector-datasource/subscribers","subscription_url":"https://api.github.com/repos/mapzen/vector-datasource/subscription","commits_url":"https://api.github.com/repos/mapzen/vector-datasource/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/vector-datasource/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/vector-datasource/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/vector-datasource/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/vector-datasource/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/vector-datasource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/vector-datasource/merges","archive_url":"https://api.github.com/repos/mapzen/vector-datasource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/vector-datasource/downloads","issues_url":"https://api.github.com/repos/mapzen/vector-datasource/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/vector-datasource/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/vector-datasource/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/vector-datasource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/vector-datasource/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/vector-datasource/releases{/id}","created_at":"2013-10-09T15:54:45Z","updated_at":"2015-11-01T12:46:02Z","pushed_at":"2015-11-03T22:30:25Z","git_url":"git://github.com/mapzen/vector-datasource.git","ssh_url":"git@github.com:mapzen/vector-datasource.git","clone_url":"https://github.com/mapzen/vector-datasource.git","svn_url":"https://github.com/mapzen/vector-datasource","homepage":"http://mapzen.com/vector","size":72434,"stargazers_count":177,"watchers_count":177,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":109,"forks":40,"open_issues":109,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380"},"html":{"href":"https://github.com/mapzen/vector-datasource/pull/380"},"issue":{"href":"https://api.github.com/repos/mapzen/vector-datasource/issues/380"},"comments":{"href":"https://api.github.com/repos/mapzen/vector-datasource/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapzen/vector-datasource/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/mapzen/vector-datasource/statuses/550a2bcf0aec7750b803e27a6d175b39878dbbcd"}}}}