[fdo][FDO239][New] GDAL: FdoIRaster::GetNullPixelValue returns NULL value
Greg Boone
greg.boone at autodesk.com
Mon Oct 30 10:31:42 EST 2006
You can view the artifact detail at the following URL:
https://fdo.osgeo.org/servlets/Scarab/id/FDO239
Type
Defect
Artifact ID
FDO239 (GDAL: FdoIRaster::GetNullPixelValue returns NULL value)
Reported by
Greg Boone
gregboone (greg.boone at autodesk.com)
New artifact details:
---------------------------------------------------------
- Artifact Status set to new value
New
- Defect Severity set to new value
Medium
- Summary set to new value
GDAL: FdoIRaster::GetNullPixelValue returns NULL value
- Description set to new value
I am running the following test...
void RfpTestBandConfig::testGetNullValue1()
{
FdoPtr<FdoIConnection> connection = CreateConnection();
FdoPtr<FdoIoStream> stream = FdoIoFileStream::Create(L"../../TestData/band/getnullvalue1.xml", L"r");
connection->SetConfiguration(stream);
connection->Open();
...
...
When debugging this test I see that the return value 'val' is never assigned a value and is returned as NULL. This is because bGotNoData is false as returned from GDALGetRasterNoDataValue. Can you elaborate on the expected behaviour?
FdoDataValue* FdoRfpBandRaster::GetNullPixelValue ()
{
FdoPtr<FdoDataValue> val;
FdoRasterDataModel* dataModel = GetDataModel ();
FdoPtr<FdoRfpImage> image = m_geoBandRaster->GetImage();
int bGotNoData;
double dfNoData;
dfNoData = GDALGetRasterNoDataValue( image->m_redBand, &bGotNoData );
if( image->m_components == 1 && bGotNoData )
{
if( image->m_gdalDataType == GDT_Byte )
val = FdoDataValue::Create((FdoInt8) dfNoData);
else if( image->m_gdalDataType == GDT_Int16 )
val = FdoDataValue::Create((FdoInt16) dfNoData);
else if( image->m_gdalDataType == GDT_Int32 )
val = FdoDataValue::Create((FdoInt32) dfNoData);
else if( image->m_gdalDataType == GDT_Float32 )
val = FdoDataValue::Create((float) dfNoData);
else // TODO: How important is it to return the right type? What about unsigned?
val = FdoDoubleValue::Create(dfNoData);
}
// TODO: Add support for NODATA_VALUES metadata, like the png&mrsid drivers return.
return FDO_SAFE_ADDREF(val.p); <<<<< !!!!!!!!!!!!!! <<<<<<< }
Local Variables.....
dfNoData -10000000000.000000 double
+ val {p=0x00000000 } FdoPtr<FdoDataValue>
bGotNoData 0 int
Call Stack.....
> GRFPProvider.dll!FdoRfpBandRaster::GetNullPixelValue() Line 432 C++
GRFPProvider.dll!FdoRfpRaster::GetNullPixelValue() Line 109 + 0xf bytes C++
UnitTest.exe!RfpTestBandConfig::testGetNullValue1() Line 327 + 0x23 bytes C++
UnitTest.exe!RfpTestBandConfig::UNITTEST_testGetNullValue1() Line 32 + 0x55 bytes C++
UnitTest.exe!CppUnit::TestCaller<RfpTestBandConfig,CppUnit::NoExceptionExpected>::runTest() Line 166 + 0x16 bytes C++
UnitTest.exe!CppUnit::TestCase::run() + 0x94 bytes C++
UnitTest.exe!CppUnit::TestSuite::run() + 0xd9 bytes C++
UnitTest.exe!CppUnit::TestSuite::run() + 0xd9 bytes C++
UnitTest.exe!CppUnit::TextUi::TestRunner::runTest() + 0x8a bytes C++
UnitTest.exe!CppUnit::TextUi::TestRunner::runTestByName() + 0x75 bytes C++
UnitTest.exe!CppUnit::TextUi::TestRunner::run() + 0x79 bytes C++
UnitTest.exe!UnitTestMainProc() Line 161 C++
UnitTest.exe!main(int argc=1, char * * argv=0x0112ca50) Line 30 C++
UnitTest.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C
UnitTest.exe!mainCRTStartup() Line 403 C
kernel32.dll!7c816fd7()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
- Priority set to new value
P3
- Artifact created
---------------------------------------------------------
This message was automatically generated by Project Tracker.
More information about the Fdo_issues
mailing list