Opened 14 years ago
#723 new defect
Wrong No Data Value
Reported by: | sgamperl | Owned by: | gregboone |
---|---|---|---|
Priority: | major | Milestone: | 3.6.0 |
Component: | WMS Provider | Version: | 3.4.0 |
Severity: | 1 | Keywords: | WMS, NullPixelValue, NODATAVALUE |
Cc: | External ID: |
Description ΒΆ
The NullPixelValue Property of the OSGeo.FDO.Raster.IRaster interface is always 0 if i use the WMS Provider.
I think the code in the function _getNullPixelValue() in FdoWMSImage.cpp is wrong.
determine the bits per pixel double null_val = m_bands[0]->GetNoDataValue(&bSuccess); if (!bSuccess)
null_val = 0;
If a palette is used in the WMS and then the first color in the palette would be the no data value. That's wrong.
A NoDataValue of 0 is a valid value. It shouldn't be set in this function if bSuccess == false.
From outside I can check with the raster.NullPixelValue.IsNull() function if it has a correct value.
Is there a workaround for the problem?