Closed bhanu-magotra closed 4 years ago
Greetings,
I believe for integer datatypes rasterio only supports int8, int16, int32 and uint8, uint16, uint32.
You can pass the desired dtype as an argument to to_raster
(e.g. to_raster(..., dtype=np.int32)).
Let me know if that helps.
Thanks, MDB
Hi Matt, Thanks for the help. I have implemented a solution as shown in the screenshot. It might not be the best workaround but it works. Thank you.
Hey Matt, I am trying to export the generated flow direction and accumulation grids using
grid.to_raster
but getting an error :TypeError: invalid dtype: 'int64'
. Please suggest the solution.Thanks. Bhanu