{"action":"created","comment":{"url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/comments/225969945","pull_request_review_id":165677747,"id":225969945,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTk2OTk0NQ==","diff_hunk":"@@ -975,19 +958,77 @@ post_process:\n   - fn: vectordatasource.transform.drop_properties_with_prefix\n     params: {prefix: mz_}\n \n+  # drop small inners in buildings before we do the merge.\n+  - fn: vectordatasource.transform.drop_small_inners\n+    params:\n+      end_zoom: 15\n+      source_layers: [buildings]\n+      pixel_area: 0.25\n+\n   - fn: vectordatasource.transform.merge_building_features\n     params:\n       source_layer: buildings\n       start_zoom: 13\n-      end_zoom: 15\n+      end_zoom: 16\n       quantize:\n-        13: vectordatasource.transform.quantize_height_round_nearest_10_meters\n-        14: vectordatasource.transform.quantize_height_round_nearest_5_meters\n+        13: vectordatasource.transform.quantize_height_round_nearest_20_meters\n+        14: vectordatasource.transform.quantize_height_round_nearest_10_meters\n+        15: vectordatasource.transform.quantize_height_round_nearest_10_meters\n+      # todo: keep instead of drop?\n       drop:\n         - name\n+        - short_name\n         - addr_housenumber\n         - addr_street\n-      max_merged_features: 1000\n+        - osm_relation\n+      # NOTE: max_merged_features is set to keep the time taken for geometry\n+      # merging down, as it seems to go up with the square of the number of\n+      # features.\n+      max_merged_features: 2000\n+\n+  # drop small inners in buildings after we do the merge, too! because the merge\n+  # process may also have created small inners.\n+  - fn: vectordatasource.transform.drop_small_inners\n+    params:\n+      end_zoom: 15\n+      source_layers: [buildings]\n+      pixel_area: 0.25","path":"queries.yaml","position":86,"original_position":86,"commit_id":"c4b96a539693d1d96f6fadcb012d77af5aa145ed","original_commit_id":"c4b96a539693d1d96f6fadcb012d77af5aa145ed","user":{"login":"rmarianski","id":53770,"node_id":"MDQ6VXNlcjUzNzcw","avatar_url":"https://avatars0.githubusercontent.com/u/53770?v=4","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":"Great idea!\r\n","created_at":"2018-10-17T15:04:14Z","updated_at":"2018-10-17T15:30:18Z","html_url":"https://github.com/tilezen/vector-datasource/pull/1689#discussion_r225969945","pull_request_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/comments/225969945"},"html":{"href":"https://github.com/tilezen/vector-datasource/pull/1689#discussion_r225969945"},"pull_request":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689"}}},"pull_request":{"url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689","id":223615013,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNjE1MDEz","html_url":"https://github.com/tilezen/vector-datasource/pull/1689","diff_url":"https://github.com/tilezen/vector-datasource/pull/1689.diff","patch_url":"https://github.com/tilezen/vector-datasource/pull/1689.patch","issue_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/1689","number":1689,"state":"open","locked":false,"title":"Building merging","user":{"login":"zerebubuth","id":271360,"node_id":"MDQ6VXNlcjI3MTM2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/271360?v=4","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":"Better building merging, resulting in fewer polygons at zooms 14 & 15 (nominal). In summary, the buildings layer size is drastically reduced:\r\n\r\nTile coordinate (512 size) | Size before (bytes) | Size after (bytes) | Reduction\r\n--- | --- | --- | ---\r\n`13/3033/4647` | 442,333 | 2,950 | 99.3%\r\n`14/6067/9294` | 587,743 | 67,008 | 88.6%\r\n`15/12134/18589` | 384,337 | 234,313 | 39.0%\r\n\r\n## Zoom 14\r\n\r\nIgnore the grey area to the south and west; that's just because I didn't render those tiles. The visual output is very similar to the style before, as we are now dropping buildings which weren't rendered anyway.\r\n\r\n![z14-after](https://user-images.githubusercontent.com/271360/47090757-67aad900-d21b-11e8-87e7-1093aaff8f88.png)\r\n\r\n## Zoom 15\r\n\r\nAt this zoom, we're now doing _much_ more merging, and in most dense areas we now merge into single \"city block\" polygons.\r\n\r\n![z15-after](https://user-images.githubusercontent.com/271360/47090770-6f6a7d80-d21b-11e8-9a1b-57f91a43c819.png)\r\n\r\n## Zoom 16\r\n\r\nZoom 16 is almost unfiltered, but we do now drop a few of the very small polygons.\r\n\r\n![z16-after](https://user-images.githubusercontent.com/271360/47090798-8315e400-d21b-11e8-8e29-92dee261b783.png)\r\n\r\n# Changes\r\n\r\n1. Building size selections for zoom now more closely match the criteria in the style.\r\n2. Merging was previously done by slice, which effectively was a random subset of the polygons. This is now done by quad tree decomposition, so nearby polygons are grouped together and are much more likely to merge.\r\n3. Building heights are now quantized at 10m intervals rather than 5m at zooms 14 & 15, and at 20m intervals for zoom 13.\r\n4. We drop more properties on buildings (`short_name`, `osm_relation`) to enable better merging.\r\n5. We drop small courtyards and other inners within buildings.\r\n\r\nOverall, this leads to much less detail in the buildings layer, but this detail isn't really visible at zooms 14 and 15 anyway. The plus side is that we now include many more \"city block\" polygons to give better visual texture to cities.\r\n","created_at":"2018-10-17T13:58:11Z","updated_at":"2018-10-17T15:30:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7197ca1175eb20b516c406943a17a8d613098949","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689/commits","review_comments_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689/comments","review_comment_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/1689/comments","statuses_url":"https://api.github.com/repos/tilezen/vector-datasource/statuses/c4b96a539693d1d96f6fadcb012d77af5aa145ed","head":{"label":"tilezen:zerebubuth/1686-building-merging","ref":"zerebubuth/1686-building-merging","sha":"c4b96a539693d1d96f6fadcb012d77af5aa145ed","user":{"login":"tilezen","id":19462720,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDYyNzIw","avatar_url":"https://avatars2.githubusercontent.com/u/19462720?v=4","gravatar_id":"","url":"https://api.github.com/users/tilezen","html_url":"https://github.com/tilezen","followers_url":"https://api.github.com/users/tilezen/followers","following_url":"https://api.github.com/users/tilezen/following{/other_user}","gists_url":"https://api.github.com/users/tilezen/gists{/gist_id}","starred_url":"https://api.github.com/users/tilezen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilezen/subscriptions","organizations_url":"https://api.github.com/users/tilezen/orgs","repos_url":"https://api.github.com/users/tilezen/repos","events_url":"https://api.github.com/users/tilezen/events{/privacy}","received_events_url":"https://api.github.com/users/tilezen/received_events","type":"Organization","site_admin":false},"repo":{"id":13446739,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0NjczOQ==","name":"vector-datasource","full_name":"tilezen/vector-datasource","private":false,"owner":{"login":"tilezen","id":19462720,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDYyNzIw","avatar_url":"https://avatars2.githubusercontent.com/u/19462720?v=4","gravatar_id":"","url":"https://api.github.com/users/tilezen","html_url":"https://github.com/tilezen","followers_url":"https://api.github.com/users/tilezen/followers","following_url":"https://api.github.com/users/tilezen/following{/other_user}","gists_url":"https://api.github.com/users/tilezen/gists{/gist_id}","starred_url":"https://api.github.com/users/tilezen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilezen/subscriptions","organizations_url":"https://api.github.com/users/tilezen/orgs","repos_url":"https://api.github.com/users/tilezen/repos","events_url":"https://api.github.com/users/tilezen/events{/privacy}","received_events_url":"https://api.github.com/users/tilezen/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tilezen/vector-datasource","description":"Mapzen vector tile service - OpenStreetMap data in several formats","fork":false,"url":"https://api.github.com/repos/tilezen/vector-datasource","forks_url":"https://api.github.com/repos/tilezen/vector-datasource/forks","keys_url":"https://api.github.com/repos/tilezen/vector-datasource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tilezen/vector-datasource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tilezen/vector-datasource/teams","hooks_url":"https://api.github.com/repos/tilezen/vector-datasource/hooks","issue_events_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/events{/number}","events_url":"https://api.github.com/repos/tilezen/vector-datasource/events","assignees_url":"https://api.github.com/repos/tilezen/vector-datasource/assignees{/user}","branches_url":"https://api.github.com/repos/tilezen/vector-datasource/branches{/branch}","tags_url":"https://api.github.com/repos/tilezen/vector-datasource/tags","blobs_url":"https://api.github.com/repos/tilezen/vector-datasource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tilezen/vector-datasource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tilezen/vector-datasource/git/refs{/sha}","trees_url":"https://api.github.com/repos/tilezen/vector-datasource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tilezen/vector-datasource/statuses/{sha}","languages_url":"https://api.github.com/repos/tilezen/vector-datasource/languages","stargazers_url":"https://api.github.com/repos/tilezen/vector-datasource/stargazers","contributors_url":"https://api.github.com/repos/tilezen/vector-datasource/contributors","subscribers_url":"https://api.github.com/repos/tilezen/vector-datasource/subscribers","subscription_url":"https://api.github.com/repos/tilezen/vector-datasource/subscription","commits_url":"https://api.github.com/repos/tilezen/vector-datasource/commits{/sha}","git_commits_url":"https://api.github.com/repos/tilezen/vector-datasource/git/commits{/sha}","comments_url":"https://api.github.com/repos/tilezen/vector-datasource/comments{/number}","issue_comment_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/comments{/number}","contents_url":"https://api.github.com/repos/tilezen/vector-datasource/contents/{+path}","compare_url":"https://api.github.com/repos/tilezen/vector-datasource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tilezen/vector-datasource/merges","archive_url":"https://api.github.com/repos/tilezen/vector-datasource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tilezen/vector-datasource/downloads","issues_url":"https://api.github.com/repos/tilezen/vector-datasource/issues{/number}","pulls_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls{/number}","milestones_url":"https://api.github.com/repos/tilezen/vector-datasource/milestones{/number}","notifications_url":"https://api.github.com/repos/tilezen/vector-datasource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tilezen/vector-datasource/labels{/name}","releases_url":"https://api.github.com/repos/tilezen/vector-datasource/releases{/id}","deployments_url":"https://api.github.com/repos/tilezen/vector-datasource/deployments","created_at":"2013-10-09T15:54:45Z","updated_at":"2018-10-15T09:07:13Z","pushed_at":"2018-10-17T14:13:33Z","git_url":"git://github.com/tilezen/vector-datasource.git","ssh_url":"git@github.com:tilezen/vector-datasource.git","clone_url":"https://github.com/tilezen/vector-datasource.git","svn_url":"https://github.com/tilezen/vector-datasource","homepage":"https://mapzen.com/projects/vector-tiles/","size":66647,"stargazers_count":354,"watchers_count":354,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":333,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":98,"open_issues":333,"watchers":354,"default_branch":"master"}},"base":{"label":"tilezen:master","ref":"master","sha":"60374e218b23d1564f4ce5f7f6f468ddbc631372","user":{"login":"tilezen","id":19462720,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDYyNzIw","avatar_url":"https://avatars2.githubusercontent.com/u/19462720?v=4","gravatar_id":"","url":"https://api.github.com/users/tilezen","html_url":"https://github.com/tilezen","followers_url":"https://api.github.com/users/tilezen/followers","following_url":"https://api.github.com/users/tilezen/following{/other_user}","gists_url":"https://api.github.com/users/tilezen/gists{/gist_id}","starred_url":"https://api.github.com/users/tilezen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilezen/subscriptions","organizations_url":"https://api.github.com/users/tilezen/orgs","repos_url":"https://api.github.com/users/tilezen/repos","events_url":"https://api.github.com/users/tilezen/events{/privacy}","received_events_url":"https://api.github.com/users/tilezen/received_events","type":"Organization","site_admin":false},"repo":{"id":13446739,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0NjczOQ==","name":"vector-datasource","full_name":"tilezen/vector-datasource","private":false,"owner":{"login":"tilezen","id":19462720,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDYyNzIw","avatar_url":"https://avatars2.githubusercontent.com/u/19462720?v=4","gravatar_id":"","url":"https://api.github.com/users/tilezen","html_url":"https://github.com/tilezen","followers_url":"https://api.github.com/users/tilezen/followers","following_url":"https://api.github.com/users/tilezen/following{/other_user}","gists_url":"https://api.github.com/users/tilezen/gists{/gist_id}","starred_url":"https://api.github.com/users/tilezen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilezen/subscriptions","organizations_url":"https://api.github.com/users/tilezen/orgs","repos_url":"https://api.github.com/users/tilezen/repos","events_url":"https://api.github.com/users/tilezen/events{/privacy}","received_events_url":"https://api.github.com/users/tilezen/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tilezen/vector-datasource","description":"Mapzen vector tile service - OpenStreetMap data in several formats","fork":false,"url":"https://api.github.com/repos/tilezen/vector-datasource","forks_url":"https://api.github.com/repos/tilezen/vector-datasource/forks","keys_url":"https://api.github.com/repos/tilezen/vector-datasource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tilezen/vector-datasource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tilezen/vector-datasource/teams","hooks_url":"https://api.github.com/repos/tilezen/vector-datasource/hooks","issue_events_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/events{/number}","events_url":"https://api.github.com/repos/tilezen/vector-datasource/events","assignees_url":"https://api.github.com/repos/tilezen/vector-datasource/assignees{/user}","branches_url":"https://api.github.com/repos/tilezen/vector-datasource/branches{/branch}","tags_url":"https://api.github.com/repos/tilezen/vector-datasource/tags","blobs_url":"https://api.github.com/repos/tilezen/vector-datasource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tilezen/vector-datasource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tilezen/vector-datasource/git/refs{/sha}","trees_url":"https://api.github.com/repos/tilezen/vector-datasource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tilezen/vector-datasource/statuses/{sha}","languages_url":"https://api.github.com/repos/tilezen/vector-datasource/languages","stargazers_url":"https://api.github.com/repos/tilezen/vector-datasource/stargazers","contributors_url":"https://api.github.com/repos/tilezen/vector-datasource/contributors","subscribers_url":"https://api.github.com/repos/tilezen/vector-datasource/subscribers","subscription_url":"https://api.github.com/repos/tilezen/vector-datasource/subscription","commits_url":"https://api.github.com/repos/tilezen/vector-datasource/commits{/sha}","git_commits_url":"https://api.github.com/repos/tilezen/vector-datasource/git/commits{/sha}","comments_url":"https://api.github.com/repos/tilezen/vector-datasource/comments{/number}","issue_comment_url":"https://api.github.com/repos/tilezen/vector-datasource/issues/comments{/number}","contents_url":"https://api.github.com/repos/tilezen/vector-datasource/contents/{+path}","compare_url":"https://api.github.com/repos/tilezen/vector-datasource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tilezen/vector-datasource/merges","archive_url":"https://api.github.com/repos/tilezen/vector-datasource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tilezen/vector-datasource/downloads","issues_url":"https://api.github.com/repos/tilezen/vector-datasource/issues{/number}","pulls_url":"https://api.github.com/repos/tilezen/vector-datasource/pulls{/number}","milestones_url":"https://api.github.com/repos/tilezen/vector-datasource/milestones{/number}","notifications_url":"https://api.github.com/repos/tilezen/vector-datasource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tilezen/vector-datasource/labels{/name}","releases_url":"https://api.github.com/repos/tilezen/vector-datasource/releases{/id}","deployments_url":"https://api.github.com/repos/tilezen/vector-datasource/deployments","created_at":"2013-10-09T15:54:45Z","updated_at":"2018-10-15T09:07:13Z","pushed_at":"2018-10-17T14:13:33Z","git_url":"git://github.com/tilezen/vector-datasource.git","ssh_url":"git@github.com:tilezen/vector-datasource.git","clone_url":"https://github.com/tilezen/vector-datasource.git","svn_url":"https://github.com/tilezen/vector-datasource","homepage":"https://mapzen.com/projects/vector-tiles/","size":66647,"stargazers_count":354,"watchers_count":354,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":333,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":98,"open_issues":333,"watchers":354,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689"},"html":{"href":"https://github.com/tilezen/vector-datasource/pull/1689"},"issue":{"href":"https://api.github.com/repos/tilezen/vector-datasource/issues/1689"},"comments":{"href":"https://api.github.com/repos/tilezen/vector-datasource/issues/1689/comments"},"review_comments":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689/comments"},"review_comment":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tilezen/vector-datasource/pulls/1689/commits"},"statuses":{"href":"https://api.github.com/repos/tilezen/vector-datasource/statuses/c4b96a539693d1d96f6fadcb012d77af5aa145ed"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"rmarianski"}}