{"action":"created","comment":{"url":"https://api.github.com/repos/valhalla/baldr/pulls/comments/30703276","id":30703276,"diff_hunk":"@@ -70,10 +70,11 @@ namespace {\n     });\n   }\n \n-  std::string to_feature_collection(const std::unordered_map<size_t, std::list<PointLL> >& regions) {\n+  template <class T>\n+  std::string to_feature_collection(const std::unordered_map<size_t, std::list<PointLL> >& regions, const std::multimap<size_t, size_t, T>& arities) {\n     auto features = json::array({});\n-    for(const auto& region : regions)\n-      features->emplace_back(to_feature(region));\n+    for(const auto& arity : arities)","path":"src/baldr/connectivity_map.cc","position":10,"original_position":10,"commit_id":"db6723afbf18c6fe3ea472ef9ca1218278f9e0ad","original_commit_id":"db6723afbf18c6fe3ea472ef9ca1218278f9e0ad","user":{"login":"kevinkreiser","id":697548,"avatar_url":"https://avatars.githubusercontent.com/u/697548?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkreiser","html_url":"https://github.com/kevinkreiser","followers_url":"https://api.github.com/users/kevinkreiser/followers","following_url":"https://api.github.com/users/kevinkreiser/following{/other_user}","gists_url":"https://api.github.com/users/kevinkreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkreiser/subscriptions","organizations_url":"https://api.github.com/users/kevinkreiser/orgs","repos_url":"https://api.github.com/users/kevinkreiser/repos","events_url":"https://api.github.com/users/kevinkreiser/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkreiser/received_events","type":"User","site_admin":false},"body":"write the features with the largest arities first. so that the largest colored regions appear first in the geojson. this should make it easier to have stable colors for the largest regions when rendering. the largest regions shouldnt change much and should pretty much be in the same order. so if we generate colors randomly with a constant seed, the largest features will likely get the same colors with the smaller regions jockying for the last places in the list and seeing more color changes","created_at":"2015-05-20T13:52:54Z","updated_at":"2015-05-20T13:52:54Z","html_url":"https://github.com/valhalla/baldr/pull/163#discussion_r30703276","pull_request_url":"https://api.github.com/repos/valhalla/baldr/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/comments/30703276"},"html":{"href":"https://github.com/valhalla/baldr/pull/163#discussion_r30703276"},"pull_request":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/valhalla/baldr/pulls/163","id":35833286,"html_url":"https://github.com/valhalla/baldr/pull/163","diff_url":"https://github.com/valhalla/baldr/pull/163.diff","patch_url":"https://github.com/valhalla/baldr/pull/163.patch","issue_url":"https://api.github.com/repos/valhalla/baldr/issues/163","number":163,"state":"open","locked":false,"title":"sort geojson connectivity map by largest regions first","user":{"login":"kevinkreiser","id":697548,"avatar_url":"https://avatars.githubusercontent.com/u/697548?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkreiser","html_url":"https://github.com/kevinkreiser","followers_url":"https://api.github.com/users/kevinkreiser/followers","following_url":"https://api.github.com/users/kevinkreiser/following{/other_user}","gists_url":"https://api.github.com/users/kevinkreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkreiser/subscriptions","organizations_url":"https://api.github.com/users/kevinkreiser/orgs","repos_url":"https://api.github.com/users/kevinkreiser/repos","events_url":"https://api.github.com/users/kevinkreiser/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkreiser/received_events","type":"User","site_admin":false},"body":"last connectivity map pull request for now i promise (excluding the one to turn it on in data production chef land of course)","created_at":"2015-05-20T13:49:12Z","updated_at":"2015-05-20T13:52:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ca6aff6eff7a5eb8f80dba6ec3361f4078d9c8b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/valhalla/baldr/pulls/163/commits","review_comments_url":"https://api.github.com/repos/valhalla/baldr/pulls/163/comments","review_comment_url":"https://api.github.com/repos/valhalla/baldr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valhalla/baldr/issues/163/comments","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/db6723afbf18c6fe3ea472ef9ca1218278f9e0ad","head":{"label":"valhalla:kk_conn","ref":"kk_conn","sha":"db6723afbf18c6fe3ea472ef9ca1218278f9e0ad","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186324,"name":"baldr","full_name":"valhalla/baldr","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/baldr","description":"Routing-specific data structures distilled into a library for use within other parts of the system","fork":false,"url":"https://api.github.com/repos/valhalla/baldr","forks_url":"https://api.github.com/repos/valhalla/baldr/forks","keys_url":"https://api.github.com/repos/valhalla/baldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/baldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/baldr/teams","hooks_url":"https://api.github.com/repos/valhalla/baldr/hooks","issue_events_url":"https://api.github.com/repos/valhalla/baldr/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/baldr/events","assignees_url":"https://api.github.com/repos/valhalla/baldr/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/baldr/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/baldr/tags","blobs_url":"https://api.github.com/repos/valhalla/baldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/baldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/baldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/baldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/baldr/languages","stargazers_url":"https://api.github.com/repos/valhalla/baldr/stargazers","contributors_url":"https://api.github.com/repos/valhalla/baldr/contributors","subscribers_url":"https://api.github.com/repos/valhalla/baldr/subscribers","subscription_url":"https://api.github.com/repos/valhalla/baldr/subscription","commits_url":"https://api.github.com/repos/valhalla/baldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/baldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/baldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/baldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/baldr/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/baldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/baldr/merges","archive_url":"https://api.github.com/repos/valhalla/baldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/baldr/downloads","issues_url":"https://api.github.com/repos/valhalla/baldr/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/baldr/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/baldr/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/baldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/baldr/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/baldr/releases{/id}","created_at":"2014-12-18T14:18:18Z","updated_at":"2015-05-08T17:17:31Z","pushed_at":"2015-05-20T13:49:12Z","git_url":"git://github.com/valhalla/baldr.git","ssh_url":"git@github.com:valhalla/baldr.git","clone_url":"https://github.com/valhalla/baldr.git","svn_url":"https://github.com/valhalla/baldr","homepage":null,"size":3984,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"valhalla:master","ref":"master","sha":"d65aaf2ef61d6fa4b7151728daf3a6b78bb554d9","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186324,"name":"baldr","full_name":"valhalla/baldr","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/baldr","description":"Routing-specific data structures distilled into a library for use within other parts of the system","fork":false,"url":"https://api.github.com/repos/valhalla/baldr","forks_url":"https://api.github.com/repos/valhalla/baldr/forks","keys_url":"https://api.github.com/repos/valhalla/baldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/baldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/baldr/teams","hooks_url":"https://api.github.com/repos/valhalla/baldr/hooks","issue_events_url":"https://api.github.com/repos/valhalla/baldr/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/baldr/events","assignees_url":"https://api.github.com/repos/valhalla/baldr/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/baldr/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/baldr/tags","blobs_url":"https://api.github.com/repos/valhalla/baldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/baldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/baldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/baldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/baldr/languages","stargazers_url":"https://api.github.com/repos/valhalla/baldr/stargazers","contributors_url":"https://api.github.com/repos/valhalla/baldr/contributors","subscribers_url":"https://api.github.com/repos/valhalla/baldr/subscribers","subscription_url":"https://api.github.com/repos/valhalla/baldr/subscription","commits_url":"https://api.github.com/repos/valhalla/baldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/baldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/baldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/baldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/baldr/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/baldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/baldr/merges","archive_url":"https://api.github.com/repos/valhalla/baldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/baldr/downloads","issues_url":"https://api.github.com/repos/valhalla/baldr/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/baldr/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/baldr/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/baldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/baldr/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/baldr/releases{/id}","created_at":"2014-12-18T14:18:18Z","updated_at":"2015-05-08T17:17:31Z","pushed_at":"2015-05-20T13:49:12Z","git_url":"git://github.com/valhalla/baldr.git","ssh_url":"git@github.com:valhalla/baldr.git","clone_url":"https://github.com/valhalla/baldr.git","svn_url":"https://github.com/valhalla/baldr","homepage":null,"size":3984,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/163"},"html":{"href":"https://github.com/valhalla/baldr/pull/163"},"issue":{"href":"https://api.github.com/repos/valhalla/baldr/issues/163"},"comments":{"href":"https://api.github.com/repos/valhalla/baldr/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/valhalla/baldr/statuses/db6723afbf18c6fe3ea472ef9ca1218278f9e0ad"}}}}