{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/25078978","id":25078978,"diff_hunk":"@@ -41,9 +41,13 @@\n   NoData Value=15\n \"\"\"\n import os\n+import struct\n+import tempfile\n import unittest\n \n from django.contrib.gis.gdal import HAS_GDAL\n+from django.contrib.gis.gdal.tests.data.textrasters import JSON_RASTER","path":"tests/gis_tests/gdal_tests/test_raster.py","position":9,"original_position":9,"commit_id":"220f3ab9cf5db747b3c1391a37e84f6175d9b714","original_commit_id":"220f3ab9cf5db747b3c1391a37e84f6175d9b714","user":{"login":"claudep","id":143192,"avatar_url":"https://avatars.githubusercontent.com/u/143192?v=3","gravatar_id":"","url":"https://api.github.com/users/claudep","html_url":"https://github.com/claudep","followers_url":"https://api.github.com/users/claudep/followers","following_url":"https://api.github.com/users/claudep/following{/other_user}","gists_url":"https://api.github.com/users/claudep/gists{/gist_id}","starred_url":"https://api.github.com/users/claudep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudep/subscriptions","organizations_url":"https://api.github.com/users/claudep/orgs","repos_url":"https://api.github.com/users/claudep/repos","events_url":"https://api.github.com/users/claudep/events{/privacy}","received_events_url":"https://api.github.com/users/claudep/received_events","type":"User","site_admin":false},"body":"The path needs updating (I'd use a relative one)","created_at":"2015-02-20T15:55:20Z","updated_at":"2015-02-20T15:55:20Z","html_url":"https://github.com/django/django/pull/3909#discussion_r25078978","pull_request_url":"https://api.github.com/repos/django/django/pulls/3909","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/25078978"},"html":{"href":"https://github.com/django/django/pull/3909#discussion_r25078978"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/3909"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/3909","id":27281645,"html_url":"https://github.com/django/django/pull/3909","diff_url":"https://github.com/django/django/pull/3909.diff","patch_url":"https://github.com/django/django/pull/3909.patch","issue_url":"https://api.github.com/repos/django/django/issues/3909","number":3909,"state":"open","locked":false,"title":"Read and write support for pixel values in GDALBands","user":{"login":"yellowcap","id":901647,"avatar_url":"https://avatars.githubusercontent.com/u/901647?v=3","gravatar_id":"","url":"https://api.github.com/users/yellowcap","html_url":"https://github.com/yellowcap","followers_url":"https://api.github.com/users/yellowcap/followers","following_url":"https://api.github.com/users/yellowcap/following{/other_user}","gists_url":"https://api.github.com/users/yellowcap/gists{/gist_id}","starred_url":"https://api.github.com/users/yellowcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yellowcap/subscriptions","organizations_url":"https://api.github.com/users/yellowcap/orgs","repos_url":"https://api.github.com/users/yellowcap/repos","events_url":"https://api.github.com/users/yellowcap/events{/privacy}","received_events_url":"https://api.github.com/users/yellowcap/received_events","type":"User","site_admin":false},"body":"- Allow instantiation of GDALRasters from json/dict data\r\n- Added read and write support for GDALBand pixel values throught `data` attribute.\r\n- Added setter functions for some other `GDALRaster` and `GDALBand` properties: `srs`, `geotransform`, `nodata_value`.\r\n- Support for `GDALFlushCache` in gdal C prototypes\r\n- Added private flush method to GDALRaster to make sure all\r\n  data is written to files when file-based rasters are changed.\r\n- Small bugfix for `__del__` method: replaced `_ptr` with `ptr`\r\n\r\nThe idea behind the instantiation of GDALRasters from ``json`` or ``dict``  data is to have a flexible way of converting DB values into GDALRaster instances.\r\n\r\nPostGIS Rasters, SpatialLite Rasters and Oracle GeoRasters are all defined quite differently and do not follow a common standard. This is why the instanciation of GDALRasters needs to be flexible, the idea is to have the DB wrappers/adapters to convert the differnt output from the databases into a common format: a dictionary with the parsed data.\r\n\r\n\r\nRefs #23804.","created_at":"2015-01-13T16:03:15Z","updated_at":"2015-02-20T15:55:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bfe72e1959baaca4116168e5a98e921e7ef7d72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/3909/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/3909/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments/{number}","comments_url":"https://api.github.com/repos/django/django/issues/3909/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/220f3ab9cf5db747b3c1391a37e84f6175d9b714","head":{"label":"geodesign:write_band_data","ref":"write_band_data","sha":"220f3ab9cf5db747b3c1391a37e84f6175d9b714","user":{"login":"geodesign","id":8367349,"avatar_url":"https://avatars.githubusercontent.com/u/8367349?v=3","gravatar_id":"","url":"https://api.github.com/users/geodesign","html_url":"https://github.com/geodesign","followers_url":"https://api.github.com/users/geodesign/followers","following_url":"https://api.github.com/users/geodesign/following{/other_user}","gists_url":"https://api.github.com/users/geodesign/gists{/gist_id}","starred_url":"https://api.github.com/users/geodesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geodesign/subscriptions","organizations_url":"https://api.github.com/users/geodesign/orgs","repos_url":"https://api.github.com/users/geodesign/repos","events_url":"https://api.github.com/users/geodesign/events{/privacy}","received_events_url":"https://api.github.com/users/geodesign/received_events","type":"Organization","site_admin":false},"repo":{"id":26547832,"name":"django","full_name":"geodesign/django","owner":{"login":"geodesign","id":8367349,"avatar_url":"https://avatars.githubusercontent.com/u/8367349?v=3","gravatar_id":"","url":"https://api.github.com/users/geodesign","html_url":"https://github.com/geodesign","followers_url":"https://api.github.com/users/geodesign/followers","following_url":"https://api.github.com/users/geodesign/following{/other_user}","gists_url":"https://api.github.com/users/geodesign/gists{/gist_id}","starred_url":"https://api.github.com/users/geodesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geodesign/subscriptions","organizations_url":"https://api.github.com/users/geodesign/orgs","repos_url":"https://api.github.com/users/geodesign/repos","events_url":"https://api.github.com/users/geodesign/events{/privacy}","received_events_url":"https://api.github.com/users/geodesign/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geodesign/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/geodesign/django","forks_url":"https://api.github.com/repos/geodesign/django/forks","keys_url":"https://api.github.com/repos/geodesign/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geodesign/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geodesign/django/teams","hooks_url":"https://api.github.com/repos/geodesign/django/hooks","issue_events_url":"https://api.github.com/repos/geodesign/django/issues/events{/number}","events_url":"https://api.github.com/repos/geodesign/django/events","assignees_url":"https://api.github.com/repos/geodesign/django/assignees{/user}","branches_url":"https://api.github.com/repos/geodesign/django/branches{/branch}","tags_url":"https://api.github.com/repos/geodesign/django/tags","blobs_url":"https://api.github.com/repos/geodesign/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geodesign/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geodesign/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/geodesign/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geodesign/django/statuses/{sha}","languages_url":"https://api.github.com/repos/geodesign/django/languages","stargazers_url":"https://api.github.com/repos/geodesign/django/stargazers","contributors_url":"https://api.github.com/repos/geodesign/django/contributors","subscribers_url":"https://api.github.com/repos/geodesign/django/subscribers","subscription_url":"https://api.github.com/repos/geodesign/django/subscription","commits_url":"https://api.github.com/repos/geodesign/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/geodesign/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/geodesign/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/geodesign/django/issues/comments/{number}","contents_url":"https://api.github.com/repos/geodesign/django/contents/{+path}","compare_url":"https://api.github.com/repos/geodesign/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geodesign/django/merges","archive_url":"https://api.github.com/repos/geodesign/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geodesign/django/downloads","issues_url":"https://api.github.com/repos/geodesign/django/issues{/number}","pulls_url":"https://api.github.com/repos/geodesign/django/pulls{/number}","milestones_url":"https://api.github.com/repos/geodesign/django/milestones{/number}","notifications_url":"https://api.github.com/repos/geodesign/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geodesign/django/labels{/name}","releases_url":"https://api.github.com/repos/geodesign/django/releases{/id}","created_at":"2014-11-12T17:35:51Z","updated_at":"2015-02-18T13:40:30Z","pushed_at":"2015-02-18T13:40:30Z","git_url":"git://github.com/geodesign/django.git","ssh_url":"git@github.com:geodesign/django.git","clone_url":"https://github.com/geodesign/django.git","svn_url":"https://github.com/geodesign/django","homepage":"https://www.djangoproject.com/","size":121692,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"4dd1f4c5eb7a617c1ee512e7a7c732d530e13916","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments/{number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-02-20T15:52:05Z","pushed_at":"2015-02-20T14:56:24Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":260948,"stargazers_count":12984,"watchers_count":12984,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5068,"mirror_url":null,"open_issues_count":86,"forks":5068,"open_issues":86,"watchers":12984,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/3909"},"html":{"href":"https://github.com/django/django/pull/3909"},"issue":{"href":"https://api.github.com/repos/django/django/issues/3909"},"comments":{"href":"https://api.github.com/repos/django/django/issues/3909/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/3909/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/3909/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/220f3ab9cf5db747b3c1391a37e84f6175d9b714"}}}}