{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/rasterio/pulls/comments/27849504","id":27849504,"diff_hunk":"@@ -34,19 +34,22 @@\n @use_rs_opt\n @geojson_type_feature_opt(True)\n @geojson_type_bbox_opt(False)\n-@click.option('--bands/--mask', default=True,\n+@click.option('--band/--mask', default=True,\n               help=\"Extract shapes from one of the dataset bands or from \"\n                    \"its nodata mask\")\n-@click.option('--bidx', type=int, default=1,\n+@click.option('--bidx', 'bandidx', type=int, default=None,\n               help=\"Index of the source band\")\n @click.option('--sampling', type=int, default=1,\n               help=\"Inverse of the sampling fraction\")\n @click.option('--with-nodata/--without-nodata', default=False,\n               help=\"Include or do not include (the default) nodata regions.\")\n+@click.option('--as-mask/--not-as-mask', default=False,\n+              help=\"Interpret a band as a mask and output only one class of \"\n+                   \"valid data shapes.\")\n @click.pass_context\n def shapes(\n         ctx, input, precision, indent, compact, projection, sequence,\n-        use_rs, geojson_type, bands, bidx, sampling, with_nodata):\n+        use_rs, geojson_type, band, bandidx, sampling, with_nodata, as_mask):\n     \"\"\"Writes features of a dataset out as GeoJSON. It's intended for","path":"rasterio/rio/features.py","position":23,"original_position":23,"commit_id":"d9347069c8208749955b92b7b8d28f04d2168e3d","original_commit_id":"d9347069c8208749955b92b7b8d28f04d2168e3d","user":{"login":"brendan-ward","id":3375604,"avatar_url":"https://avatars.githubusercontent.com/u/3375604?v=3","gravatar_id":"","url":"https://api.github.com/users/brendan-ward","html_url":"https://github.com/brendan-ward","followers_url":"https://api.github.com/users/brendan-ward/followers","following_url":"https://api.github.com/users/brendan-ward/following{/other_user}","gists_url":"https://api.github.com/users/brendan-ward/gists{/gist_id}","starred_url":"https://api.github.com/users/brendan-ward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendan-ward/subscriptions","organizations_url":"https://api.github.com/users/brendan-ward/orgs","repos_url":"https://api.github.com/users/brendan-ward/repos","events_url":"https://api.github.com/users/brendan-ward/events{/privacy}","received_events_url":"https://api.github.com/users/brendan-ward/received_events","type":"User","site_admin":false},"body":"@sgillies Can you please expand the docstring to give a bit more explanation to usage of the parameters above, particularly how they should best be combined?","created_at":"2015-04-07T03:31:57Z","updated_at":"2015-04-07T03:31:57Z","html_url":"https://github.com/mapbox/rasterio/pull/318#discussion_r27849504","pull_request_url":"https://api.github.com/repos/mapbox/rasterio/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/comments/27849504"},"html":{"href":"https://github.com/mapbox/rasterio/pull/318#discussion_r27849504"},"pull_request":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/rasterio/pulls/318","id":32703097,"html_url":"https://github.com/mapbox/rasterio/pull/318","diff_url":"https://github.com/mapbox/rasterio/pull/318.diff","patch_url":"https://github.com/mapbox/rasterio/pull/318.patch","issue_url":"https://api.github.com/repos/mapbox/rasterio/issues/318","number":318,"state":"open","locked":false,"title":"Improvements to rio-shapes","user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"body":"Closes #316.","created_at":"2015-04-06T19:24:49Z","updated_at":"2015-04-07T03:31:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b37aacae179ef61840c85f9106f8a9d4e62e3511","assignee":null,"milestone":{"url":"https://api.github.com/repos/mapbox/rasterio/milestones/26","html_url":"https://github.com/mapbox/rasterio/milestones/0.20","labels_url":"https://api.github.com/repos/mapbox/rasterio/milestones/26/labels","id":1052118,"number":26,"title":"0.20","description":null,"creator":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":5,"state":"open","created_at":"2015-04-03T18:39:01Z","updated_at":"2015-04-06T19:24:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mapbox/rasterio/pulls/318/commits","review_comments_url":"https://api.github.com/repos/mapbox/rasterio/pulls/318/comments","review_comment_url":"https://api.github.com/repos/mapbox/rasterio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/318/comments","statuses_url":"https://api.github.com/repos/mapbox/rasterio/statuses/d9347069c8208749955b92b7b8d28f04d2168e3d","head":{"label":"mapbox:ship-shape-rio-shape","ref":"ship-shape-rio-shape","sha":"d9347069c8208749955b92b7b8d28f04d2168e3d","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":14116604,"name":"rasterio","full_name":"mapbox/rasterio","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/rasterio","description":"Clean and fast and geospatial raster I/O for Python programmers who use Numpy","fork":false,"url":"https://api.github.com/repos/mapbox/rasterio","forks_url":"https://api.github.com/repos/mapbox/rasterio/forks","keys_url":"https://api.github.com/repos/mapbox/rasterio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/rasterio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/rasterio/teams","hooks_url":"https://api.github.com/repos/mapbox/rasterio/hooks","issue_events_url":"https://api.github.com/repos/mapbox/rasterio/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/rasterio/events","assignees_url":"https://api.github.com/repos/mapbox/rasterio/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/rasterio/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/rasterio/tags","blobs_url":"https://api.github.com/repos/mapbox/rasterio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/rasterio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/rasterio/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/rasterio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/rasterio/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/rasterio/languages","stargazers_url":"https://api.github.com/repos/mapbox/rasterio/stargazers","contributors_url":"https://api.github.com/repos/mapbox/rasterio/contributors","subscribers_url":"https://api.github.com/repos/mapbox/rasterio/subscribers","subscription_url":"https://api.github.com/repos/mapbox/rasterio/subscription","commits_url":"https://api.github.com/repos/mapbox/rasterio/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/rasterio/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/rasterio/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/rasterio/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/rasterio/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/rasterio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/rasterio/merges","archive_url":"https://api.github.com/repos/mapbox/rasterio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/rasterio/downloads","issues_url":"https://api.github.com/repos/mapbox/rasterio/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/rasterio/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/rasterio/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/rasterio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/rasterio/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/rasterio/releases{/id}","created_at":"2013-11-04T16:36:27Z","updated_at":"2015-04-06T19:25:45Z","pushed_at":"2015-04-06T19:25:44Z","git_url":"git://github.com/mapbox/rasterio.git","ssh_url":"git@github.com:mapbox/rasterio.git","clone_url":"https://github.com/mapbox/rasterio.git","svn_url":"https://github.com/mapbox/rasterio","homepage":"","size":4611,"stargazers_count":240,"watchers_count":240,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":52,"mirror_url":null,"open_issues_count":29,"forks":52,"open_issues":29,"watchers":240,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"5bb1c4fe610410d2be585ff6ef5a41f875a4be54","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":14116604,"name":"rasterio","full_name":"mapbox/rasterio","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/rasterio","description":"Clean and fast and geospatial raster I/O for Python programmers who use Numpy","fork":false,"url":"https://api.github.com/repos/mapbox/rasterio","forks_url":"https://api.github.com/repos/mapbox/rasterio/forks","keys_url":"https://api.github.com/repos/mapbox/rasterio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/rasterio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/rasterio/teams","hooks_url":"https://api.github.com/repos/mapbox/rasterio/hooks","issue_events_url":"https://api.github.com/repos/mapbox/rasterio/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/rasterio/events","assignees_url":"https://api.github.com/repos/mapbox/rasterio/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/rasterio/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/rasterio/tags","blobs_url":"https://api.github.com/repos/mapbox/rasterio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/rasterio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/rasterio/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/rasterio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/rasterio/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/rasterio/languages","stargazers_url":"https://api.github.com/repos/mapbox/rasterio/stargazers","contributors_url":"https://api.github.com/repos/mapbox/rasterio/contributors","subscribers_url":"https://api.github.com/repos/mapbox/rasterio/subscribers","subscription_url":"https://api.github.com/repos/mapbox/rasterio/subscription","commits_url":"https://api.github.com/repos/mapbox/rasterio/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/rasterio/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/rasterio/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/rasterio/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/rasterio/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/rasterio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/rasterio/merges","archive_url":"https://api.github.com/repos/mapbox/rasterio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/rasterio/downloads","issues_url":"https://api.github.com/repos/mapbox/rasterio/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/rasterio/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/rasterio/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/rasterio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/rasterio/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/rasterio/releases{/id}","created_at":"2013-11-04T16:36:27Z","updated_at":"2015-04-06T19:25:45Z","pushed_at":"2015-04-06T19:25:44Z","git_url":"git://github.com/mapbox/rasterio.git","ssh_url":"git@github.com:mapbox/rasterio.git","clone_url":"https://github.com/mapbox/rasterio.git","svn_url":"https://github.com/mapbox/rasterio","homepage":"","size":4611,"stargazers_count":240,"watchers_count":240,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":52,"mirror_url":null,"open_issues_count":29,"forks":52,"open_issues":29,"watchers":240,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/318"},"html":{"href":"https://github.com/mapbox/rasterio/pull/318"},"issue":{"href":"https://api.github.com/repos/mapbox/rasterio/issues/318"},"comments":{"href":"https://api.github.com/repos/mapbox/rasterio/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/rasterio/statuses/d9347069c8208749955b92b7b8d28f04d2168e3d"}}}}