on-internet
← Community

How to change the dtype of a Raster using Rasterio

Stack Overflow ·

I've been having trouble dealing with no data values in Python's rasterio package when applying a polygon mask on a raster data set. This particular raster is Landsat uint8 with 7 bands and the no data value is not inherently specified because 255 is the reserved value for no data. However, sometimes uint8 data is compressed from uint16 data, and the 255 value is a valid data value which I do not want considered as 'no data' (the data are full bit range). The default for rasterio's mask function is to consider 0 as a 'no data' value if this argument isn't specified, which is problematic in the

Comments

Sign in or sign up to comment and upvote.

No comments yet.