{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2","id":204469070,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NDY5MDcw","html_url":"https://github.com/johntruckenbrodt/spatialist/pull/2","diff_url":"https://github.com/johntruckenbrodt/spatialist/pull/2.diff","patch_url":"https://github.com/johntruckenbrodt/spatialist/pull/2.patch","issue_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/2","number":2,"state":"open","locked":false,"title":"Raster subsetting","user":{"login":"johntruckenbrodt","id":18419439,"node_id":"MDQ6VXNlcjE4NDE5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/18419439?v=4","gravatar_id":"","url":"https://api.github.com/users/johntruckenbrodt","html_url":"https://github.com/johntruckenbrodt","followers_url":"https://api.github.com/users/johntruckenbrodt/followers","following_url":"https://api.github.com/users/johntruckenbrodt/following{/other_user}","gists_url":"https://api.github.com/users/johntruckenbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/johntruckenbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntruckenbrodt/subscriptions","organizations_url":"https://api.github.com/users/johntruckenbrodt/orgs","repos_url":"https://api.github.com/users/johntruckenbrodt/repos","events_url":"https://api.github.com/users/johntruckenbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/johntruckenbrodt/received_events","type":"User","site_admin":false},"body":"this pull request enables direct subsetting of Raster objects by making use of in-memory GDAL VRT files and in-memory gdal.Dataset functionalities. The following will now work:\r\n```Python\r\nfrom spatialist import Raster, Vector\r\n\r\nwith Raster(rasterfile) as ras:\r\n    with ras[0:100,50:200,1:10] as sub:\r\n        sub.write(outname='subset')\r\n\r\nwith Raster(rasterfile) as ras:\r\n    with Vector(vectorfile) as vec:\r\n        with ras[vec] as sub:\r\n            sub.write(outname='subset2')   \r\n```\r\nWhen subsetting with a Vector object, the Raster object is first subsetted to the extent of the Vector object and then masked by the overlap with the vector geometries.","created_at":"2018-07-27T15:42:11Z","updated_at":"2018-07-27T15:42:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2/commits","review_comments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2/comments","review_comment_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/2/comments","statuses_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/statuses/db01b7903c3deb1647462e2df47708941d9744ac","head":{"label":"johntruckenbrodt:raster_subsetting","ref":"raster_subsetting","sha":"db01b7903c3deb1647462e2df47708941d9744ac","user":{"login":"johntruckenbrodt","id":18419439,"node_id":"MDQ6VXNlcjE4NDE5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/18419439?v=4","gravatar_id":"","url":"https://api.github.com/users/johntruckenbrodt","html_url":"https://github.com/johntruckenbrodt","followers_url":"https://api.github.com/users/johntruckenbrodt/followers","following_url":"https://api.github.com/users/johntruckenbrodt/following{/other_user}","gists_url":"https://api.github.com/users/johntruckenbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/johntruckenbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntruckenbrodt/subscriptions","organizations_url":"https://api.github.com/users/johntruckenbrodt/orgs","repos_url":"https://api.github.com/users/johntruckenbrodt/repos","events_url":"https://api.github.com/users/johntruckenbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/johntruckenbrodt/received_events","type":"User","site_admin":false},"repo":{"id":140029056,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAwMjkwNTY=","name":"spatialist","full_name":"johntruckenbrodt/spatialist","owner":{"login":"johntruckenbrodt","id":18419439,"node_id":"MDQ6VXNlcjE4NDE5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/18419439?v=4","gravatar_id":"","url":"https://api.github.com/users/johntruckenbrodt","html_url":"https://github.com/johntruckenbrodt","followers_url":"https://api.github.com/users/johntruckenbrodt/followers","following_url":"https://api.github.com/users/johntruckenbrodt/following{/other_user}","gists_url":"https://api.github.com/users/johntruckenbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/johntruckenbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntruckenbrodt/subscriptions","organizations_url":"https://api.github.com/users/johntruckenbrodt/orgs","repos_url":"https://api.github.com/users/johntruckenbrodt/repos","events_url":"https://api.github.com/users/johntruckenbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/johntruckenbrodt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johntruckenbrodt/spatialist","description":"A Python module for spatial data handling","fork":false,"url":"https://api.github.com/repos/johntruckenbrodt/spatialist","forks_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/forks","keys_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/teams","hooks_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/hooks","issue_events_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/events{/number}","events_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/events","assignees_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/assignees{/user}","branches_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/branches{/branch}","tags_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/tags","blobs_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/refs{/sha}","trees_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/statuses/{sha}","languages_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/languages","stargazers_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/stargazers","contributors_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/contributors","subscribers_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/subscribers","subscription_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/subscription","commits_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/commits{/sha}","git_commits_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/commits{/sha}","comments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/comments{/number}","issue_comment_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/comments{/number}","contents_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/contents/{+path}","compare_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/merges","archive_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/downloads","issues_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues{/number}","pulls_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls{/number}","milestones_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/milestones{/number}","notifications_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/labels{/name}","releases_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/releases{/id}","deployments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/deployments","created_at":"2018-07-06T20:58:34Z","updated_at":"2018-07-26T08:52:55Z","pushed_at":"2018-07-27T15:27:46Z","git_url":"git://github.com/johntruckenbrodt/spatialist.git","ssh_url":"git@github.com:johntruckenbrodt/spatialist.git","clone_url":"https://github.com/johntruckenbrodt/spatialist.git","svn_url":"https://github.com/johntruckenbrodt/spatialist","homepage":null,"size":14902,"stargazers_count":3,"watchers_count":3,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"johntruckenbrodt:master","ref":"master","sha":"6cc1e9b9b3b5caa2d7d59b333e7b2b381b21bd9f","user":{"login":"johntruckenbrodt","id":18419439,"node_id":"MDQ6VXNlcjE4NDE5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/18419439?v=4","gravatar_id":"","url":"https://api.github.com/users/johntruckenbrodt","html_url":"https://github.com/johntruckenbrodt","followers_url":"https://api.github.com/users/johntruckenbrodt/followers","following_url":"https://api.github.com/users/johntruckenbrodt/following{/other_user}","gists_url":"https://api.github.com/users/johntruckenbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/johntruckenbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntruckenbrodt/subscriptions","organizations_url":"https://api.github.com/users/johntruckenbrodt/orgs","repos_url":"https://api.github.com/users/johntruckenbrodt/repos","events_url":"https://api.github.com/users/johntruckenbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/johntruckenbrodt/received_events","type":"User","site_admin":false},"repo":{"id":140029056,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAwMjkwNTY=","name":"spatialist","full_name":"johntruckenbrodt/spatialist","owner":{"login":"johntruckenbrodt","id":18419439,"node_id":"MDQ6VXNlcjE4NDE5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/18419439?v=4","gravatar_id":"","url":"https://api.github.com/users/johntruckenbrodt","html_url":"https://github.com/johntruckenbrodt","followers_url":"https://api.github.com/users/johntruckenbrodt/followers","following_url":"https://api.github.com/users/johntruckenbrodt/following{/other_user}","gists_url":"https://api.github.com/users/johntruckenbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/johntruckenbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntruckenbrodt/subscriptions","organizations_url":"https://api.github.com/users/johntruckenbrodt/orgs","repos_url":"https://api.github.com/users/johntruckenbrodt/repos","events_url":"https://api.github.com/users/johntruckenbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/johntruckenbrodt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johntruckenbrodt/spatialist","description":"A Python module for spatial data handling","fork":false,"url":"https://api.github.com/repos/johntruckenbrodt/spatialist","forks_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/forks","keys_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/teams","hooks_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/hooks","issue_events_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/events{/number}","events_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/events","assignees_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/assignees{/user}","branches_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/branches{/branch}","tags_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/tags","blobs_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/refs{/sha}","trees_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/statuses/{sha}","languages_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/languages","stargazers_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/stargazers","contributors_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/contributors","subscribers_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/subscribers","subscription_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/subscription","commits_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/commits{/sha}","git_commits_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/git/commits{/sha}","comments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/comments{/number}","issue_comment_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/comments{/number}","contents_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/contents/{+path}","compare_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/merges","archive_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/downloads","issues_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues{/number}","pulls_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls{/number}","milestones_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/milestones{/number}","notifications_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/labels{/name}","releases_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/releases{/id}","deployments_url":"https://api.github.com/repos/johntruckenbrodt/spatialist/deployments","created_at":"2018-07-06T20:58:34Z","updated_at":"2018-07-26T08:52:55Z","pushed_at":"2018-07-27T15:27:46Z","git_url":"git://github.com/johntruckenbrodt/spatialist.git","ssh_url":"git@github.com:johntruckenbrodt/spatialist.git","clone_url":"https://github.com/johntruckenbrodt/spatialist.git","svn_url":"https://github.com/johntruckenbrodt/spatialist","homepage":null,"size":14902,"stargazers_count":3,"watchers_count":3,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2"},"html":{"href":"https://github.com/johntruckenbrodt/spatialist/pull/2"},"issue":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/2"},"comments":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/johntruckenbrodt/spatialist/statuses/db01b7903c3deb1647462e2df47708941d9744ac"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":29,"additions":398,"deletions":141,"changed_files":7}}
{"actor":{"display_login":"johntruckenbrodt"}}