You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Raster.set_ndv supposedly accept several nodata values, but this hasn't been tested and it fails.
Related to #223 .
To Reproduce
import geoutils as gu
img = gu.Raster(gu.datasets.get_path("landsat_RGB"))
img.set_ndv([2,3, 4])
fails with error
ValueError: Given nodata value, [2, 3, 4], is beyond the valid range of its data type, uint8.
Expected behavior
This should not raise an error.
Apparently, this is not possible to create a raster with several nodata values at the moment with rasterio. This has been raised as an issue: rasterio/rasterio#2234
In the meantime, a quick fix would be to add a NotImplementedError if several nodata values are passed.
System (please complete the following information):
irrelevant
Additional context
None
The text was updated successfully, but these errors were encountered:
Describe the bug
Raster.set_ndv supposedly accept several nodata values, but this hasn't been tested and it fails.
Related to #223 .
To Reproduce
fails with error
Expected behavior
This should not raise an error.
Apparently, this is not possible to create a raster with several nodata values at the moment with rasterio. This has been raised as an issue: rasterio/rasterio#2234
In the meantime, a quick fix would be to add a NotImplementedError if several nodata values are passed.
System (please complete the following information):
irrelevant
Additional context
None
The text was updated successfully, but these errors were encountered: