{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/931","repository_url":"https://api.github.com/repos/mapbox/rasterio","labels_url":"https://api.github.com/repos/mapbox/rasterio/issues/931/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/931/comments","events_url":"https://api.github.com/repos/mapbox/rasterio/issues/931/events","html_url":"https://github.com/mapbox/rasterio/issues/931","id":193110405,"number":931,"title":"Warp and reprojection to Europe Albers Equal Area Conic results in clipping","user":{"login":"mpi-bgc-ae","id":24316356,"avatar_url":"https://avatars.githubusercontent.com/u/24316356?v=3","gravatar_id":"","url":"https://api.github.com/users/mpi-bgc-ae","html_url":"https://github.com/mpi-bgc-ae","followers_url":"https://api.github.com/users/mpi-bgc-ae/followers","following_url":"https://api.github.com/users/mpi-bgc-ae/following{/other_user}","gists_url":"https://api.github.com/users/mpi-bgc-ae/gists{/gist_id}","starred_url":"https://api.github.com/users/mpi-bgc-ae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpi-bgc-ae/subscriptions","organizations_url":"https://api.github.com/users/mpi-bgc-ae/orgs","repos_url":"https://api.github.com/users/mpi-bgc-ae/repos","events_url":"https://api.github.com/users/mpi-bgc-ae/events{/privacy}","received_events_url":"https://api.github.com/users/mpi-bgc-ae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-02T12:58:03Z","updated_at":"2016-12-06T16:58:09Z","closed_at":null,"body":"Hi Everyone,\r\n\r\nUsing rasterio's `calculate_default_transform` and `reproject` functions, the following PROJ.4 projection produces clipped Landsat MSS images for southwestern Europe:\r\n\r\n`+proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs`\r\n\r\nA CRS is generated from the string with the `rasterio.crs.CRS.from_string` function. Any ideas as to why this might be happening? I tried updating the bounding box using the `transform_bounds` function, but that produced the same result. I believe there is something wrong with the underlying calculations for this projection.\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/comments/265205866","html_url":"https://github.com/mapbox/rasterio/issues/931#issuecomment-265205866","issue_url":"https://api.github.com/repos/mapbox/rasterio/issues/931","id":265205866,"user":{"login":"perrygeo","id":1151287,"avatar_url":"https://avatars.githubusercontent.com/u/1151287?v=3","gravatar_id":"","url":"https://api.github.com/users/perrygeo","html_url":"https://github.com/perrygeo","followers_url":"https://api.github.com/users/perrygeo/followers","following_url":"https://api.github.com/users/perrygeo/following{/other_user}","gists_url":"https://api.github.com/users/perrygeo/gists{/gist_id}","starred_url":"https://api.github.com/users/perrygeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrygeo/subscriptions","organizations_url":"https://api.github.com/users/perrygeo/orgs","repos_url":"https://api.github.com/users/perrygeo/repos","events_url":"https://api.github.com/users/perrygeo/events{/privacy}","received_events_url":"https://api.github.com/users/perrygeo/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T16:58:09Z","updated_at":"2016-12-06T16:58:09Z","body":"Adam, found the problem. In the code above, the destination array needs be the set to the new destination width/height, not the original shape. So instead of \r\n\r\n```\r\ndst_array = numpy.empty(stack.shape, dtype=numpy.uint8)\r\n```\r\n\r\nwe could use\r\n\r\n```\r\nn_bands = 3\r\ndst_array = numpy.empty((n_bands, dst_width, dst_height), dtype=numpy.uint8)\r\n```\r\n\r\n\r\n@mpi-bgc-ae "}}
{"actor":{"display_login":"perrygeo"}}