Re: reproject on numpy array

Sean Gillies
 

Hi,

The thing that is tripping Guy up is that reproject has an optional init_dest_nodata keyword argument that defaults to True: the output array is filled with the nodata value (0) before warped pixels are copied over. Guy, if you pass init_dest_nodata=False you will get the results you expect.


On Tue, Dec 18, 2018 at 10:06 AM Alan Snow <alansnow21@...> wrote:
Hi Guy,

The dest array will be overwritten by the reprojected data based on your source array. So, to get ones in the destination, you would need to modify the source array to have ones in it.

Hope that helps,
Alan



--
Sean Gillies

Join main@rasterio.groups.io to automatically receive all group messages.