- read masked and overviews when no-data value is defined
Re: read masked and overviews when no-data value is defined
toggle quoted messageShow quoted text
A month ago we resolved an issue in Rasterio that has some commonalities with yours. There was a report that overviews were being missed when reading masked arrays and it turned out that the overviews themselves were in error.
In Rasterio, we will skip reading a mask from the dataset if the dataset has no mask, but otherwise we don't call GDAL functions differently in the band mask vs nodata cases.
Can you tell us what nodata value is implicated in this problem and what software produced the data files?
On Mon, Aug 6, 2018 at 8:52 AM <guyd@...
We are trying to read masked array using `DatasetReaderBase.read`, reading the documentation it looks that if we pass masked=True we will get what we wanted.
I was testing the read on raster with pre-built overviews and I used the overviews in read. From functionality point of view, I always got the right result, but I was tesing the data block that are being used, and I noticed this behaviors:
1. When using band-mask, there was a read only from the overview to construct the mask -- as excpected
2. When using no-data value there were reads the data of the original resolution and not from the nearest overview? when mask=False it reads data only from the overview, why is that?
A workaround for that is to read with no mask and to construct the mask myself using the no-data value.
Join firstname.lastname@example.org to automatically receive all group messages.