{"action":"opened","number":399,"pull_request":{"url":"https://api.github.com/repos/Toblerity/Shapely/pulls/399","id":80383080,"html_url":"https://github.com/Toblerity/Shapely/pull/399","diff_url":"https://github.com/Toblerity/Shapely/pull/399.diff","patch_url":"https://github.com/Toblerity/Shapely/pull/399.patch","issue_url":"https://api.github.com/repos/Toblerity/Shapely/issues/399","number":399,"state":"open","locked":false,"title":"Attempt at porting Polylabel algorithm (#395)","user":{"login":"allanadair","id":1674686,"avatar_url":"https://avatars.githubusercontent.com/u/1674686?v=3","gravatar_id":"","url":"https://api.github.com/users/allanadair","html_url":"https://github.com/allanadair","followers_url":"https://api.github.com/users/allanadair/followers","following_url":"https://api.github.com/users/allanadair/following{/other_user}","gists_url":"https://api.github.com/users/allanadair/gists{/gist_id}","starred_url":"https://api.github.com/users/allanadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanadair/subscriptions","organizations_url":"https://api.github.com/users/allanadair/orgs","repos_url":"https://api.github.com/users/allanadair/repos","events_url":"https://api.github.com/users/allanadair/events{/privacy}","received_events_url":"https://api.github.com/users/allanadair/received_events","type":"User","site_admin":false},"body":"First attempt at porting Polylabel algorithm from https://github.com/mapbox/polylabel (#395). I would appreciate advice/guidance on contributing to Shapely since this is pretty much my first code contribution.\r\n\r\nA few things to note:\r\n\r\n1. Performance is not as good as I would like. Ideas?\r\n2. The original test data from mapbox/polylabel produced pretty dirty polygons, so I did not include the original data in the test fixture. I just grabbed a dense polygon of Lake Superior.\r\n3. The original algorithm uses a maximum priority queue. Python provides a minimal priority queue through `heapq`, which required some logic modifications.\r\n4. I used preexisting Shapely functionality where possible instead of porting identical functionality from the JavaScript mapbox/polylabel implementation.\r\n5. I had several assumptions while porting this. For example, I didn't include support for 3D.\r\n6. I'm not sure if I put source files in the correct locations. Please let me know. I also wasn't sure if the algorithm should be imported to `shapely/geometry/polygon.py`.\r\n7. I didn't add any documentation, but I would like to if/when this addition is accepted.","created_at":"2016-08-08T00:39:06Z","updated_at":"2016-08-08T00:39:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc5fa6e5299a93bddd415dad62ec1e437566ebf1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/399/commits","review_comments_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/399/comments","review_comment_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/issues/399/comments","statuses_url":"https://api.github.com/repos/Toblerity/Shapely/statuses/3f601069942605d3b3c94406baf03cc0a0b546ad","head":{"label":"allanadair:polylabel","ref":"polylabel","sha":"3f601069942605d3b3c94406baf03cc0a0b546ad","user":{"login":"allanadair","id":1674686,"avatar_url":"https://avatars.githubusercontent.com/u/1674686?v=3","gravatar_id":"","url":"https://api.github.com/users/allanadair","html_url":"https://github.com/allanadair","followers_url":"https://api.github.com/users/allanadair/followers","following_url":"https://api.github.com/users/allanadair/following{/other_user}","gists_url":"https://api.github.com/users/allanadair/gists{/gist_id}","starred_url":"https://api.github.com/users/allanadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanadair/subscriptions","organizations_url":"https://api.github.com/users/allanadair/orgs","repos_url":"https://api.github.com/users/allanadair/repos","events_url":"https://api.github.com/users/allanadair/events{/privacy}","received_events_url":"https://api.github.com/users/allanadair/received_events","type":"User","site_admin":false},"repo":{"id":64883600,"name":"Shapely","full_name":"allanadair/Shapely","owner":{"login":"allanadair","id":1674686,"avatar_url":"https://avatars.githubusercontent.com/u/1674686?v=3","gravatar_id":"","url":"https://api.github.com/users/allanadair","html_url":"https://github.com/allanadair","followers_url":"https://api.github.com/users/allanadair/followers","following_url":"https://api.github.com/users/allanadair/following{/other_user}","gists_url":"https://api.github.com/users/allanadair/gists{/gist_id}","starred_url":"https://api.github.com/users/allanadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanadair/subscriptions","organizations_url":"https://api.github.com/users/allanadair/orgs","repos_url":"https://api.github.com/users/allanadair/repos","events_url":"https://api.github.com/users/allanadair/events{/privacy}","received_events_url":"https://api.github.com/users/allanadair/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allanadair/Shapely","description":"Manipulation and analysis of geometric objects","fork":true,"url":"https://api.github.com/repos/allanadair/Shapely","forks_url":"https://api.github.com/repos/allanadair/Shapely/forks","keys_url":"https://api.github.com/repos/allanadair/Shapely/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allanadair/Shapely/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allanadair/Shapely/teams","hooks_url":"https://api.github.com/repos/allanadair/Shapely/hooks","issue_events_url":"https://api.github.com/repos/allanadair/Shapely/issues/events{/number}","events_url":"https://api.github.com/repos/allanadair/Shapely/events","assignees_url":"https://api.github.com/repos/allanadair/Shapely/assignees{/user}","branches_url":"https://api.github.com/repos/allanadair/Shapely/branches{/branch}","tags_url":"https://api.github.com/repos/allanadair/Shapely/tags","blobs_url":"https://api.github.com/repos/allanadair/Shapely/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allanadair/Shapely/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allanadair/Shapely/git/refs{/sha}","trees_url":"https://api.github.com/repos/allanadair/Shapely/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allanadair/Shapely/statuses/{sha}","languages_url":"https://api.github.com/repos/allanadair/Shapely/languages","stargazers_url":"https://api.github.com/repos/allanadair/Shapely/stargazers","contributors_url":"https://api.github.com/repos/allanadair/Shapely/contributors","subscribers_url":"https://api.github.com/repos/allanadair/Shapely/subscribers","subscription_url":"https://api.github.com/repos/allanadair/Shapely/subscription","commits_url":"https://api.github.com/repos/allanadair/Shapely/commits{/sha}","git_commits_url":"https://api.github.com/repos/allanadair/Shapely/git/commits{/sha}","comments_url":"https://api.github.com/repos/allanadair/Shapely/comments{/number}","issue_comment_url":"https://api.github.com/repos/allanadair/Shapely/issues/comments{/number}","contents_url":"https://api.github.com/repos/allanadair/Shapely/contents/{+path}","compare_url":"https://api.github.com/repos/allanadair/Shapely/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allanadair/Shapely/merges","archive_url":"https://api.github.com/repos/allanadair/Shapely/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allanadair/Shapely/downloads","issues_url":"https://api.github.com/repos/allanadair/Shapely/issues{/number}","pulls_url":"https://api.github.com/repos/allanadair/Shapely/pulls{/number}","milestones_url":"https://api.github.com/repos/allanadair/Shapely/milestones{/number}","notifications_url":"https://api.github.com/repos/allanadair/Shapely/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allanadair/Shapely/labels{/name}","releases_url":"https://api.github.com/repos/allanadair/Shapely/releases{/id}","deployments_url":"https://api.github.com/repos/allanadair/Shapely/deployments","created_at":"2016-08-03T22:25:22Z","updated_at":"2016-08-03T22:25:23Z","pushed_at":"2016-08-08T00:10:47Z","git_url":"git://github.com/allanadair/Shapely.git","ssh_url":"git@github.com:allanadair/Shapely.git","clone_url":"https://github.com/allanadair/Shapely.git","svn_url":"https://github.com/allanadair/Shapely","homepage":"http://toblerity.github.com/shapely/","size":1885,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"Toblerity:master","ref":"master","sha":"1d2dc8599a3851566e1f5397577c2e257adf4f5d","user":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"repo":{"id":3080613,"name":"Shapely","full_name":"Toblerity/Shapely","owner":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Toblerity/Shapely","description":"Manipulation and analysis of geometric objects","fork":false,"url":"https://api.github.com/repos/Toblerity/Shapely","forks_url":"https://api.github.com/repos/Toblerity/Shapely/forks","keys_url":"https://api.github.com/repos/Toblerity/Shapely/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Toblerity/Shapely/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Toblerity/Shapely/teams","hooks_url":"https://api.github.com/repos/Toblerity/Shapely/hooks","issue_events_url":"https://api.github.com/repos/Toblerity/Shapely/issues/events{/number}","events_url":"https://api.github.com/repos/Toblerity/Shapely/events","assignees_url":"https://api.github.com/repos/Toblerity/Shapely/assignees{/user}","branches_url":"https://api.github.com/repos/Toblerity/Shapely/branches{/branch}","tags_url":"https://api.github.com/repos/Toblerity/Shapely/tags","blobs_url":"https://api.github.com/repos/Toblerity/Shapely/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Toblerity/Shapely/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Toblerity/Shapely/git/refs{/sha}","trees_url":"https://api.github.com/repos/Toblerity/Shapely/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Toblerity/Shapely/statuses/{sha}","languages_url":"https://api.github.com/repos/Toblerity/Shapely/languages","stargazers_url":"https://api.github.com/repos/Toblerity/Shapely/stargazers","contributors_url":"https://api.github.com/repos/Toblerity/Shapely/contributors","subscribers_url":"https://api.github.com/repos/Toblerity/Shapely/subscribers","subscription_url":"https://api.github.com/repos/Toblerity/Shapely/subscription","commits_url":"https://api.github.com/repos/Toblerity/Shapely/commits{/sha}","git_commits_url":"https://api.github.com/repos/Toblerity/Shapely/git/commits{/sha}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/comments{/number}","issue_comment_url":"https://api.github.com/repos/Toblerity/Shapely/issues/comments{/number}","contents_url":"https://api.github.com/repos/Toblerity/Shapely/contents/{+path}","compare_url":"https://api.github.com/repos/Toblerity/Shapely/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Toblerity/Shapely/merges","archive_url":"https://api.github.com/repos/Toblerity/Shapely/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Toblerity/Shapely/downloads","issues_url":"https://api.github.com/repos/Toblerity/Shapely/issues{/number}","pulls_url":"https://api.github.com/repos/Toblerity/Shapely/pulls{/number}","milestones_url":"https://api.github.com/repos/Toblerity/Shapely/milestones{/number}","notifications_url":"https://api.github.com/repos/Toblerity/Shapely/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Toblerity/Shapely/labels{/name}","releases_url":"https://api.github.com/repos/Toblerity/Shapely/releases{/id}","deployments_url":"https://api.github.com/repos/Toblerity/Shapely/deployments","created_at":"2011-12-31T19:43:11Z","updated_at":"2016-08-04T11:01:00Z","pushed_at":"2016-08-08T00:39:06Z","git_url":"git://github.com/Toblerity/Shapely.git","ssh_url":"git@github.com:Toblerity/Shapely.git","clone_url":"https://github.com/Toblerity/Shapely.git","svn_url":"https://github.com/Toblerity/Shapely","homepage":"http://toblerity.github.com/shapely/","size":2408,"stargazers_count":487,"watchers_count":487,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":131,"mirror_url":null,"open_issues_count":20,"forks":131,"open_issues":20,"watchers":487,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/399"},"html":{"href":"https://github.com/Toblerity/Shapely/pull/399"},"issue":{"href":"https://api.github.com/repos/Toblerity/Shapely/issues/399"},"comments":{"href":"https://api.github.com/repos/Toblerity/Shapely/issues/399/comments"},"review_comments":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/399/comments"},"review_comment":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/399/commits"},"statuses":{"href":"https://api.github.com/repos/Toblerity/Shapely/statuses/3f601069942605d3b3c94406baf03cc0a0b546ad"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":142,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"allanadair"}}