{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/888","repository_url":"https://api.github.com/repos/mapbox/rasterio","labels_url":"https://api.github.com/repos/mapbox/rasterio/issues/888/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/888/comments","events_url":"https://api.github.com/repos/mapbox/rasterio/issues/888/events","html_url":"https://github.com/mapbox/rasterio/issues/888","id":178296724,"number":888,"title":"Importing rasterio leads to OGR Failure in GeoDjango","user":{"login":"lordi","id":232086,"avatar_url":"https://avatars.githubusercontent.com/u/232086?v=3","gravatar_id":"","url":"https://api.github.com/users/lordi","html_url":"https://github.com/lordi","followers_url":"https://api.github.com/users/lordi/followers","following_url":"https://api.github.com/users/lordi/following{/other_user}","gists_url":"https://api.github.com/users/lordi/gists{/gist_id}","starred_url":"https://api.github.com/users/lordi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordi/subscriptions","organizations_url":"https://api.github.com/users/lordi/orgs","repos_url":"https://api.github.com/users/lordi/repos","events_url":"https://api.github.com/users/lordi/events{/privacy}","received_events_url":"https://api.github.com/users/lordi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-21T09:42:55Z","updated_at":"2016-09-21T09:42:55Z","closed_at":null,"body":"After importing, calling \"transform\" on a GEOS Point leads to an exception.\r\n\r\n* rasterio 0.36\r\n* GDAL 1.10.1\r\n* Python 3.4.2\r\n\r\n```\r\nPython 3.4.2 (default, Oct  8 2014, 10:45:20) \r\n[GCC 4.9.1] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from django.contrib.gis.geos import Point\r\n>>> print(Point(2500000, 8500000, 0.0, srid=25832).transform('EPSG:4326', clone=True))\r\nSRID=4326;POINT Z (27.4517640749582235 70.8806800968583275 0.0000000000000000)\r\n>>> import rasterio\r\n>>> print(Point(2500000, 8500000, 0.0, srid=25832).transform('EPSG:4326', clone=True))\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/geos/geometry.py\", line 505, in transform\r\n    g.transform(ct)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/geometries.py\", line 393, in transform\r\n    capi.geom_transform_to(self.ptr, sr.ptr)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/prototypes/errcheck.py\", line 119, in check_errcode\r\n    check_err(result, cpl=cpl)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/error.py\", line 72, in check_err\r\n    raise e(msg)\r\ndjango.contrib.gis.gdal.error.GDALException: OGR failure.\r\n```\r\n\r\nI compared the environment after importing rasterio, and saw that it added \"PROJ_LIB\" which pointed to non-existing directory ``(...)lib/python3.4/site-packages/rasterio/proj_data``. But removing this key has no effect so I figure the error is caused by something else:\r\n\r\n```\r\n>>> import os\r\n>>> del os.environ['PROJ_LIB']\r\n>>> print(Point(2500000, 8500000, 0.0, srid=25832).transform('EPSG:4326', clone=True))\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/geos/geometry.py\", line 505, in transform\r\n    g.transform(ct)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/geometries.py\", line 393, in transform\r\n    capi.geom_transform_to(self.ptr, sr.ptr)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/prototypes/errcheck.py\", line 119, in check_errcode\r\n    check_err(result, cpl=cpl)\r\n  File \"/var/www/visweb/maps/lib/python3.4/site-packages/django/contrib/gis/gdal/error.py\", line 72, in check_err\r\n    raise e(msg)\r\ndjango.contrib.gis.gdal.error.GDALException: OGR failure.\r\n```\r\n\r\n\r\nAny hints?"}}
{"actor":{"display_login":"lordi"}}