{"action":"created","comment":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/comments/150071639","pull_request_review_id":75568579,"id":150071639,"diff_hunk":"@@ -2735,11 +2741,10 @@ QGISEXTERN QgsGdalProvider *create(\n     return new QgsGdalProvider( uri, error );\n   }\n \n-  GDALSetGeoTransform( dataset.get(), geoTransform );\n-  GDALSetProjection( dataset.get(), crs.toWkt().toLocal8Bit().data() );\n-  dataset.reset();\n+  GDALSetGeoTransform( dataset, geoTransform );\n+  GDALSetProjection( dataset, crs.toWkt().toLocal8Bit().data() );\n \n-  return new QgsGdalProvider( uri, true );\n+  return new QgsGdalProvider( uri, true, dataset );","path":"src/providers/gdal/qgsgdalprovider.cpp","position":82,"original_position":82,"commit_id":"c3e15f522837d1f0bdd47c1ffc1b0ab3cba5e869","original_commit_id":"c3e15f522837d1f0bdd47c1ffc1b0ab3cba5e869","user":{"login":"rouault","id":1192433,"avatar_url":"https://avatars2.githubusercontent.com/u/1192433?v=4","gravatar_id":"","url":"https://api.github.com/users/rouault","html_url":"https://github.com/rouault","followers_url":"https://api.github.com/users/rouault/followers","following_url":"https://api.github.com/users/rouault/following{/other_user}","gists_url":"https://api.github.com/users/rouault/gists{/gist_id}","starred_url":"https://api.github.com/users/rouault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouault/subscriptions","organizations_url":"https://api.github.com/users/rouault/orgs","repos_url":"https://api.github.com/users/rouault/repos","events_url":"https://api.github.com/users/rouault/events{/privacy}","received_events_url":"https://api.github.com/users/rouault/received_events","type":"User","site_admin":false},"body":"Re-added per faa0861d97b5c7834180b884a159d224cdac44fa","created_at":"2017-11-09T20:02:19Z","updated_at":"2017-11-09T20:02:19Z","html_url":"https://github.com/qgis/QGIS/pull/5580#discussion_r150071639","pull_request_url":"https://api.github.com/repos/qgis/QGIS/pulls/5580","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments/150071639"},"html":{"href":"https://github.com/qgis/QGIS/pull/5580#discussion_r150071639"},"pull_request":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/5580"}},"in_reply_to_id":150065845},"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/5580","id":151665376,"html_url":"https://github.com/qgis/QGIS/pull/5580","diff_url":"https://github.com/qgis/QGIS/pull/5580.diff","patch_url":"https://github.com/qgis/QGIS/pull/5580.patch","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/5580","number":5580,"state":"closed","locked":false,"title":"[GDAL provider] in create(), use newly create dataset handle to instanciate the provider (fix #17103)","user":{"login":"rouault","id":1192433,"avatar_url":"https://avatars2.githubusercontent.com/u/1192433?v=4","gravatar_id":"","url":"https://api.github.com/users/rouault","html_url":"https://github.com/rouault","followers_url":"https://api.github.com/users/rouault/followers","following_url":"https://api.github.com/users/rouault/following{/other_user}","gists_url":"https://api.github.com/users/rouault/gists{/gist_id}","starred_url":"https://api.github.com/users/rouault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouault/subscriptions","organizations_url":"https://api.github.com/users/rouault/orgs","repos_url":"https://api.github.com/users/rouault/repos","events_url":"https://api.github.com/users/rouault/events{/privacy}","received_events_url":"https://api.github.com/users/rouault/received_events","type":"User","site_admin":false},"body":"Previously we created an empty file, close it and re-opened it immediately in open mode.\r\nHowever for GeoPackage, if you create for example a 1 band or 3 band dataset, upon reopening\r\nyou get a 4 band RGBA dataset, due to the fact that GeoPackage doesn't explicitly store the\r\nnumber of bands. Thus the 4th band (alpha) was never written by the QgsRasterFileWriter logic.\r\n","created_at":"2017-11-09T14:27:06Z","updated_at":"2017-11-09T20:02:19Z","closed_at":"2017-11-09T15:24:24Z","merged_at":"2017-11-09T15:24:24Z","merge_commit_sha":"d00efde2f0645918cabd4fc34b7c8b71933c6380","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/qgis/QGIS/pulls/5580/commits","review_comments_url":"https://api.github.com/repos/qgis/QGIS/pulls/5580/comments","review_comment_url":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/5580/comments","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/c3e15f522837d1f0bdd47c1ffc1b0ab3cba5e869","head":{"label":"rouault:fix_QgsRasterFileWriter_geopackage","ref":"fix_QgsRasterFileWriter_geopackage","sha":"c3e15f522837d1f0bdd47c1ffc1b0ab3cba5e869","user":{"login":"rouault","id":1192433,"avatar_url":"https://avatars2.githubusercontent.com/u/1192433?v=4","gravatar_id":"","url":"https://api.github.com/users/rouault","html_url":"https://github.com/rouault","followers_url":"https://api.github.com/users/rouault/followers","following_url":"https://api.github.com/users/rouault/following{/other_user}","gists_url":"https://api.github.com/users/rouault/gists{/gist_id}","starred_url":"https://api.github.com/users/rouault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouault/subscriptions","organizations_url":"https://api.github.com/users/rouault/orgs","repos_url":"https://api.github.com/users/rouault/repos","events_url":"https://api.github.com/users/rouault/events{/privacy}","received_events_url":"https://api.github.com/users/rouault/received_events","type":"User","site_admin":false},"repo":{"id":2815827,"name":"Quantum-GIS","full_name":"rouault/Quantum-GIS","owner":{"login":"rouault","id":1192433,"avatar_url":"https://avatars2.githubusercontent.com/u/1192433?v=4","gravatar_id":"","url":"https://api.github.com/users/rouault","html_url":"https://github.com/rouault","followers_url":"https://api.github.com/users/rouault/followers","following_url":"https://api.github.com/users/rouault/following{/other_user}","gists_url":"https://api.github.com/users/rouault/gists{/gist_id}","starred_url":"https://api.github.com/users/rouault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouault/subscriptions","organizations_url":"https://api.github.com/users/rouault/orgs","repos_url":"https://api.github.com/users/rouault/repos","events_url":"https://api.github.com/users/rouault/events{/privacy}","received_events_url":"https://api.github.com/users/rouault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rouault/Quantum-GIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":true,"url":"https://api.github.com/repos/rouault/Quantum-GIS","forks_url":"https://api.github.com/repos/rouault/Quantum-GIS/forks","keys_url":"https://api.github.com/repos/rouault/Quantum-GIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rouault/Quantum-GIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rouault/Quantum-GIS/teams","hooks_url":"https://api.github.com/repos/rouault/Quantum-GIS/hooks","issue_events_url":"https://api.github.com/repos/rouault/Quantum-GIS/issues/events{/number}","events_url":"https://api.github.com/repos/rouault/Quantum-GIS/events","assignees_url":"https://api.github.com/repos/rouault/Quantum-GIS/assignees{/user}","branches_url":"https://api.github.com/repos/rouault/Quantum-GIS/branches{/branch}","tags_url":"https://api.github.com/repos/rouault/Quantum-GIS/tags","blobs_url":"https://api.github.com/repos/rouault/Quantum-GIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rouault/Quantum-GIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rouault/Quantum-GIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/rouault/Quantum-GIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rouault/Quantum-GIS/statuses/{sha}","languages_url":"https://api.github.com/repos/rouault/Quantum-GIS/languages","stargazers_url":"https://api.github.com/repos/rouault/Quantum-GIS/stargazers","contributors_url":"https://api.github.com/repos/rouault/Quantum-GIS/contributors","subscribers_url":"https://api.github.com/repos/rouault/Quantum-GIS/subscribers","subscription_url":"https://api.github.com/repos/rouault/Quantum-GIS/subscription","commits_url":"https://api.github.com/repos/rouault/Quantum-GIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/rouault/Quantum-GIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/rouault/Quantum-GIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/rouault/Quantum-GIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/rouault/Quantum-GIS/contents/{+path}","compare_url":"https://api.github.com/repos/rouault/Quantum-GIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rouault/Quantum-GIS/merges","archive_url":"https://api.github.com/repos/rouault/Quantum-GIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rouault/Quantum-GIS/downloads","issues_url":"https://api.github.com/repos/rouault/Quantum-GIS/issues{/number}","pulls_url":"https://api.github.com/repos/rouault/Quantum-GIS/pulls{/number}","milestones_url":"https://api.github.com/repos/rouault/Quantum-GIS/milestones{/number}","notifications_url":"https://api.github.com/repos/rouault/Quantum-GIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rouault/Quantum-GIS/labels{/name}","releases_url":"https://api.github.com/repos/rouault/Quantum-GIS/releases{/id}","deployments_url":"https://api.github.com/repos/rouault/Quantum-GIS/deployments","created_at":"2011-11-20T21:27:47Z","updated_at":"2016-06-02T08:26:03Z","pushed_at":"2017-11-09T17:21:57Z","git_url":"git://github.com/rouault/Quantum-GIS.git","ssh_url":"git@github.com:rouault/Quantum-GIS.git","clone_url":"https://github.com/rouault/Quantum-GIS.git","svn_url":"https://github.com/rouault/Quantum-GIS","homepage":"http://qgis.org","size":1229148,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"qgis:master","ref":"master","sha":"d8a3c67fa57446a7c6e91ae2c226c62f4f9e0d74","user":{"login":"qgis","id":483444,"avatar_url":"https://avatars3.githubusercontent.com/u/483444?v=4","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"repo":{"id":1690480,"name":"QGIS","full_name":"qgis/QGIS","owner":{"login":"qgis","id":483444,"avatar_url":"https://avatars3.githubusercontent.com/u/483444?v=4","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qgis/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":false,"url":"https://api.github.com/repos/qgis/QGIS","forks_url":"https://api.github.com/repos/qgis/QGIS/forks","keys_url":"https://api.github.com/repos/qgis/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qgis/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qgis/QGIS/teams","hooks_url":"https://api.github.com/repos/qgis/QGIS/hooks","issue_events_url":"https://api.github.com/repos/qgis/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/qgis/QGIS/events","assignees_url":"https://api.github.com/repos/qgis/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/qgis/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/qgis/QGIS/tags","blobs_url":"https://api.github.com/repos/qgis/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qgis/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qgis/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/qgis/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/qgis/QGIS/languages","stargazers_url":"https://api.github.com/repos/qgis/QGIS/stargazers","contributors_url":"https://api.github.com/repos/qgis/QGIS/contributors","subscribers_url":"https://api.github.com/repos/qgis/QGIS/subscribers","subscription_url":"https://api.github.com/repos/qgis/QGIS/subscription","commits_url":"https://api.github.com/repos/qgis/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/qgis/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/qgis/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/qgis/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/qgis/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/qgis/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qgis/QGIS/merges","archive_url":"https://api.github.com/repos/qgis/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qgis/QGIS/downloads","issues_url":"https://api.github.com/repos/qgis/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/qgis/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/qgis/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/qgis/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qgis/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/qgis/QGIS/releases{/id}","deployments_url":"https://api.github.com/repos/qgis/QGIS/deployments","created_at":"2011-05-02T08:06:26Z","updated_at":"2017-11-09T01:45:33Z","pushed_at":"2017-11-09T20:02:07Z","git_url":"git://github.com/qgis/QGIS.git","ssh_url":"git@github.com:qgis/QGIS.git","clone_url":"https://github.com/qgis/QGIS.git","svn_url":"https://github.com/qgis/QGIS","homepage":"http://qgis.org","size":1334679,"stargazers_count":1650,"watchers_count":1650,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1137,"mirror_url":null,"archived":false,"open_issues_count":103,"forks":1137,"open_issues":103,"watchers":1650,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/5580"},"html":{"href":"https://github.com/qgis/QGIS/pull/5580"},"issue":{"href":"https://api.github.com/repos/qgis/QGIS/issues/5580"},"comments":{"href":"https://api.github.com/repos/qgis/QGIS/issues/5580/comments"},"review_comments":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/5580/comments"},"review_comment":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/5580/commits"},"statuses":{"href":"https://api.github.com/repos/qgis/QGIS/statuses/c3e15f522837d1f0bdd47c1ffc1b0ab3cba5e869"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rouault"}}