{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/rasterio/pulls/comments/182267549","pull_request_review_id":113031054,"id":182267549,"diff_hunk":"@@ -37,15 +49,46 @@ def test_warped_vrt(path_rgb_byte_tif):\n def test_warped_vrt_source(path_rgb_byte_tif):\n     \"\"\"A VirtualVRT has the expected source dataset.\"\"\"\n     with rasterio.open(path_rgb_byte_tif) as src:\n-        vrt = WarpedVRT(src, dst_crs='EPSG:3857')\n+        vrt = WarpedVRT(src, dst_crs=DST_CRS)\n         assert vrt.src_dataset == src\n \n \n+def test_warped_vrt_set_src_crs(path_rgb_byte_tif, tmpdir):\n+    \"\"\"A VirtualVRT without CRS works only with parameter src_crs\"\"\"\n+    path_crs_unset = str(tmpdir.join('rgb_byte_crs_unset.tif'))\n+    _copy_update_profile(path_rgb_byte_tif, path_crs_unset, crs=None)\n+    with rasterio.open(path_rgb_byte_tif) as src:\n+        original_crs = src.crs\n+    with rasterio.open(path_crs_unset) as src:\n+        with pytest.raises(Exception):\n+            with WarpedVRT(src, dst_crs=DST_CRS) as vrt:\n+                pass\n+        with WarpedVRT(src, src_crs=original_crs, dst_crs=DST_CRS) as vrt:\n+            assert vrt.src_crs == original_crs\n+\n+\n+def test_warped_vrt_set_src_transform(path_rgb_byte_tif, tmpdir):\n+    \"\"\"A VirtualVRT without transform works only with parameter src_transform\"\"\"\n+    path_transform_unset = str(tmpdir.join('rgb_byte_transform_unset.tif'))\n+    _copy_update_profile(path_rgb_byte_tif, path_transform_unset, transform=None)\n+    with rasterio.open(path_rgb_byte_tif) as src:\n+        original_transform = src.transform\n+    with rasterio.open(path_transform_unset) as src:\n+        with pytest.raises(Exception):\n+            with WarpedVRT(src, dst_crs=DST_CRS) as vrt:\n+                pass\n+        with WarpedVRT(\n+                src,\n+                src_transform=original_transform,\n+                dst_transform=original_transform) as vrt:\n+            assert vrt.src_transform == original_transform","path":"tests/test_warpedvrt.py","position":64,"original_position":64,"commit_id":"5d5cbf12faa9dd430e6495d68f470cdc4d012ca0","original_commit_id":"5d5cbf12faa9dd430e6495d68f470cdc4d012ca0","user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars2.githubusercontent.com/u/33697?v=4","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":"@j08lue is the intent of this to create a warped VRT that represents a no-op? I don't think that's a valid use case, though I believe we should fail more clearly in that case. Would you be willing to remove this test? I'm fine with letting this remain a bug to be fixed after 1.0.","created_at":"2018-04-17T23:04:04Z","updated_at":"2018-04-17T23:04:04Z","html_url":"https://github.com/mapbox/rasterio/pull/1308#discussion_r182267549","pull_request_url":"https://api.github.com/repos/mapbox/rasterio/pulls/1308","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/comments/182267549"},"html":{"href":"https://github.com/mapbox/rasterio/pull/1308#discussion_r182267549"},"pull_request":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/1308"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/rasterio/pulls/1308","id":179928106,"html_url":"https://github.com/mapbox/rasterio/pull/1308","diff_url":"https://github.com/mapbox/rasterio/pull/1308.diff","patch_url":"https://github.com/mapbox/rasterio/pull/1308.patch","issue_url":"https://api.github.com/repos/mapbox/rasterio/issues/1308","number":1308,"state":"open","locked":false,"title":"WIP:Document and test src_crs and src_transform on WarpedVRT","user":{"login":"j08lue","id":3404817,"avatar_url":"https://avatars0.githubusercontent.com/u/3404817?v=4","gravatar_id":"","url":"https://api.github.com/users/j08lue","html_url":"https://github.com/j08lue","followers_url":"https://api.github.com/users/j08lue/followers","following_url":"https://api.github.com/users/j08lue/following{/other_user}","gists_url":"https://api.github.com/users/j08lue/gists{/gist_id}","starred_url":"https://api.github.com/users/j08lue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j08lue/subscriptions","organizations_url":"https://api.github.com/users/j08lue/orgs","repos_url":"https://api.github.com/users/j08lue/repos","events_url":"https://api.github.com/users/j08lue/events{/privacy}","received_events_url":"https://api.github.com/users/j08lue/received_events","type":"User","site_admin":false},"body":"This PR adds tests for the `src_crs` and `src_transform` parameters on `WarpedVRT` and adds them to the parameter list in the `WarpedVRT` docstring.\r\n\r\nAddresses #859 ","created_at":"2018-04-06T11:57:44Z","updated_at":"2018-04-17T23:04:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"465f7b6372fd0383a92bd9d6be5ebc8a0ae95666","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/rasterio/pulls/1308/commits","review_comments_url":"https://api.github.com/repos/mapbox/rasterio/pulls/1308/comments","review_comment_url":"https://api.github.com/repos/mapbox/rasterio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/1308/comments","statuses_url":"https://api.github.com/repos/mapbox/rasterio/statuses/5d5cbf12faa9dd430e6495d68f470cdc4d012ca0","head":{"label":"j08lue:vrt-src-crs","ref":"vrt-src-crs","sha":"5d5cbf12faa9dd430e6495d68f470cdc4d012ca0","user":{"login":"j08lue","id":3404817,"avatar_url":"https://avatars0.githubusercontent.com/u/3404817?v=4","gravatar_id":"","url":"https://api.github.com/users/j08lue","html_url":"https://github.com/j08lue","followers_url":"https://api.github.com/users/j08lue/followers","following_url":"https://api.github.com/users/j08lue/following{/other_user}","gists_url":"https://api.github.com/users/j08lue/gists{/gist_id}","starred_url":"https://api.github.com/users/j08lue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j08lue/subscriptions","organizations_url":"https://api.github.com/users/j08lue/orgs","repos_url":"https://api.github.com/users/j08lue/repos","events_url":"https://api.github.com/users/j08lue/events{/privacy}","received_events_url":"https://api.github.com/users/j08lue/received_events","type":"User","site_admin":false},"repo":{"id":128385401,"name":"rasterio","full_name":"j08lue/rasterio","owner":{"login":"j08lue","id":3404817,"avatar_url":"https://avatars0.githubusercontent.com/u/3404817?v=4","gravatar_id":"","url":"https://api.github.com/users/j08lue","html_url":"https://github.com/j08lue","followers_url":"https://api.github.com/users/j08lue/followers","following_url":"https://api.github.com/users/j08lue/following{/other_user}","gists_url":"https://api.github.com/users/j08lue/gists{/gist_id}","starred_url":"https://api.github.com/users/j08lue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j08lue/subscriptions","organizations_url":"https://api.github.com/users/j08lue/orgs","repos_url":"https://api.github.com/users/j08lue/repos","events_url":"https://api.github.com/users/j08lue/events{/privacy}","received_events_url":"https://api.github.com/users/j08lue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/j08lue/rasterio","description":"Rasterio reads and writes geospatial raster datasets","fork":true,"url":"https://api.github.com/repos/j08lue/rasterio","forks_url":"https://api.github.com/repos/j08lue/rasterio/forks","keys_url":"https://api.github.com/repos/j08lue/rasterio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/j08lue/rasterio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/j08lue/rasterio/teams","hooks_url":"https://api.github.com/repos/j08lue/rasterio/hooks","issue_events_url":"https://api.github.com/repos/j08lue/rasterio/issues/events{/number}","events_url":"https://api.github.com/repos/j08lue/rasterio/events","assignees_url":"https://api.github.com/repos/j08lue/rasterio/assignees{/user}","branches_url":"https://api.github.com/repos/j08lue/rasterio/branches{/branch}","tags_url":"https://api.github.com/repos/j08lue/rasterio/tags","blobs_url":"https://api.github.com/repos/j08lue/rasterio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/j08lue/rasterio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/j08lue/rasterio/git/refs{/sha}","trees_url":"https://api.github.com/repos/j08lue/rasterio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/j08lue/rasterio/statuses/{sha}","languages_url":"https://api.github.com/repos/j08lue/rasterio/languages","stargazers_url":"https://api.github.com/repos/j08lue/rasterio/stargazers","contributors_url":"https://api.github.com/repos/j08lue/rasterio/contributors","subscribers_url":"https://api.github.com/repos/j08lue/rasterio/subscribers","subscription_url":"https://api.github.com/repos/j08lue/rasterio/subscription","commits_url":"https://api.github.com/repos/j08lue/rasterio/commits{/sha}","git_commits_url":"https://api.github.com/repos/j08lue/rasterio/git/commits{/sha}","comments_url":"https://api.github.com/repos/j08lue/rasterio/comments{/number}","issue_comment_url":"https://api.github.com/repos/j08lue/rasterio/issues/comments{/number}","contents_url":"https://api.github.com/repos/j08lue/rasterio/contents/{+path}","compare_url":"https://api.github.com/repos/j08lue/rasterio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/j08lue/rasterio/merges","archive_url":"https://api.github.com/repos/j08lue/rasterio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/j08lue/rasterio/downloads","issues_url":"https://api.github.com/repos/j08lue/rasterio/issues{/number}","pulls_url":"https://api.github.com/repos/j08lue/rasterio/pulls{/number}","milestones_url":"https://api.github.com/repos/j08lue/rasterio/milestones{/number}","notifications_url":"https://api.github.com/repos/j08lue/rasterio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/j08lue/rasterio/labels{/name}","releases_url":"https://api.github.com/repos/j08lue/rasterio/releases{/id}","deployments_url":"https://api.github.com/repos/j08lue/rasterio/deployments","created_at":"2018-04-06T11:20:18Z","updated_at":"2018-04-06T11:20:21Z","pushed_at":"2018-04-06T14:49:52Z","git_url":"git://github.com/j08lue/rasterio.git","ssh_url":"git@github.com:j08lue/rasterio.git","clone_url":"https://github.com/j08lue/rasterio.git","svn_url":"https://github.com/j08lue/rasterio","homepage":"https://rasterio.readthedocs.io/en/latest/","size":23081,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"4ebdaa08cdcc65b141ed3fe95cf8bbdd9117bc0b","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","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://avatars1.githubusercontent.com/u/600935?v=4","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":"Rasterio reads and writes geospatial raster datasets","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}","deployments_url":"https://api.github.com/repos/mapbox/rasterio/deployments","created_at":"2013-11-04T16:36:27Z","updated_at":"2018-04-17T16:20:20Z","pushed_at":"2018-04-17T18:15:56Z","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":"https://rasterio.readthedocs.io/en/latest/","size":23157,"stargazers_count":752,"watchers_count":752,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":196,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":196,"open_issues":150,"watchers":752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/1308"},"html":{"href":"https://github.com/mapbox/rasterio/pull/1308"},"issue":{"href":"https://api.github.com/repos/mapbox/rasterio/issues/1308"},"comments":{"href":"https://api.github.com/repos/mapbox/rasterio/issues/1308/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/1308/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/rasterio/pulls/1308/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/rasterio/statuses/5d5cbf12faa9dd430e6495d68f470cdc4d012ca0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sgillies"}}