Hi,

Problem Summary: The calls to GDALRasterBand::RasterIO() in vpd::SourceData::getInterpolatedValue() and vpd::SourceData::readHeightField() returns no-data-values as 55537 instead of the correct -9999 for gtopo30 data.

VPB: revision 911
OSG: revision 8321
GDAL version 1.5.1

The following command line is used to create a simple globe (all DEM files from gtopo30 are used):

./osgdemd -d in/gtopo30/E020N40.DEM [...snip...] -d in/gtopo30/W180S60.DEM --bluemarble-east -t in/bluemarble/land_shallow_topo_east.tif --bluemarble-west -t in/bluemarble/land_shallow_topo_west.tif --geocentric --radius-equator 6378000 --radius-polar 6378000 -v 1.4 -l 6 -o out/simple_globe.ive -a out/simple_globe.osga

gdalinfo reports that the no-data-value for the DEM files are -9999:

dhcp6(bin)% /usr/local/bin/gdalinfo -stats in/gtopo30/E020N40.DEM
  [...snip...]
  Min=-9999.000 Max=5825.000
  Minimum=-9999.000, Maximum=5825.000, Mean=-2347.600, StdDev=4873.500
  NoData Value=-9999

... however, in the globe created by the command line above, the sea level is high above ground. After some debugging, I made the following observations:

* SourceData.cpp - vpd::ValidValueOperator::ValidValueOperator() obtains the correct no-data-value (-9990) though GDALRasterBand::GetNoDataValue() * In vpd::SourceData::getInterpolatedValue() no-data-values are not clamped to 0.0f (zero) because GDALRasterBand::RasterIO() returns no-data-values as 55537.0f (the same happens in vpd::SourceData::readHeightField())

I highly temporary work-around hack was to alter the initialization of vpb::ValidValueOperator::maxValue in line 38 in SourceData.cpp from maxValue(FLT_MAX) to maxValue(55000.0f). Hence, the faulty no-data-values are clamped to zero.

I am totally new to OSG/VPB. Does anyone have an idea of how to make a permanent fix for this problem? Is it just an incompatibility problem with GDAL 1.5.1? or...

Any advice would be greatly appreciated.

Best regards,
John Larring


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to