Hi,

I want to generate a database with osgdem but the application crashes using 
georeferenced texture data (virtualPlanetBuilder version used 0.10, 0.11 and 
svn trunk, windows machine)

The following steps lead to the problem:


1.)
Download srtm_ramp2.world.21600x10800.jpg from 
visibleearth.nasa.gov/view_detail.php?id=8391
Download world.topo.bathy.200407.3x5400x2700.jpg from 
visibleearth.nasa.gov/view_rec.php?id=7106 (or any other)
2.) gdal_translate srtm_ramp2.world.21600x10800.jpg 
srtm_ramp2.world.21600x10800_unref.tif
3.) gdal_translate reference.vrt srtm_ramp2.world.21600x10800_ref.tif


Code:

------------------------------- reference.vrt 
-----------------------------------------
<--VRTDataset rasterXSize="21600" rasterYSize="10800"-->
  <--SRS-->WGS84<--/SRS-->
  
<--GeoTransform-->-180,0.0166666666666666666,0,90,0,-0.0166666666666666666<--/GeoTransform-->
  <--VRTRasterBand dataType="Uint16" band="1"-->
        <--ColorInterp-->Gray<--/ColorInterp-->
        <--SimpleSource-->
          
<--SourceFilename-->srtm_ramp2.world.21600x10800_unref.tif<--/SourceFilename-->
          <--SourceBand-->1<--/SourceBand-->
          <--SrcRect xOff="0" yOff="0" xSize="21600" ySize="10800"/-->
          <--DstRect xOff="0" yOff="0" xSize="21600" ySize="10800"/-->
        <--/SimpleSource-->
  <--/VRTRasterBand-->
<--/VRTDataset-->
---------------------------------------------------------------------------------------



(replace the <-- and --> with the correct brackets)

4a)
osgdem --whole-globe -t world.topo.bathy.200407.3x5400x2700.jpg -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 -o earth.ive
osgdem --whole-globe -t world.topo.bathy.200407.3x5400x2700.jpg -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 --geocentric -o earth.ive
(I also tried --bluemarble-east -t land_shallow_topo_east.tif --bluemarble-west 
-t land_shallow_topo_west.tif)
All fail with windows error message "osgdem.exe stopped working", fault Module 
Name: vpb.dll, console output:


Code:

Constructor OSGReaderWriter - loaded OK
Constructor ReaderWriterOSG2 - loaded OK
--geocentric
--whole-globe GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 
84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",
0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],
AUTHORITY["EPSG","4326"]] matrix={
        360 0 0 0
        0 180 0 0
        0 0 1 0
        -180 -90 0 1
}

-t world.topo.bathy.200407.3x5400x2700.jpg
ADD: world.topo.bathy.200407.3x5400x2700.jpg
loaded layer world.topo.bathy.200407.3x5400x2700.jpg
-d srtm_ramp2.world.21600x10800_ref.tif
ADD: srtm_ramp2.world.21600x10800_ref.tif
-o earth.ive
Adding terrainTile
DataSet::_run() 0 0
started DataSet::createDestination(3)
Time for after_reproject 0.000258
local_extents = xMin() -180.000000 180.000000
                yMin() -90.000000 90.000000
AR=2.000000 C1=2 R1=1
createNewDestinationGraph
Time for _destinationGraph->computeMaximumSourceResolution() = 0.016105
Time for createDestinationGraph 0.032705
Time for after_computeNeighbours 0.000504
completed DataSet::createDestination(3)
There are 2 contributing source files:
    srtm_ramp2.world.21600x10800_ref.tif
    world.topo.bathy.200407.3x5400x2700.jpg
mkpath()
Need to create output task directory = earth_root_L0_X0_Y0
mkpath(earth_root_L0_X0_Y0)
   created directory earth_root_L0_X0_Y0
Task output directory = earth_root_L0_X0_Y0\
started DataSet::writeDestination(earth.ive)
_readRow 1
   reading tile level=0 X=0 Y=0
imageName = earth_L0_X0_Y0.dds
DestinationTile::readFrom(SetName=, 
FileName=world.topo.bathy.200407.3x5400x2700.jpg)





Alternatively, world.topo.bathy.200407.3x5400x2700.jpg can also be referenced:

4b) gdal_translate world.topo.bathy.200407.3x5400x2700.jpg 
world.topo.bathy.200407.3x5400x2700_unref.tif
5b) gdal_translate reference2.vrt world.topo.bathy.200407.3x5400x2700_ref.tif


Code:

------------------------------- reference2.vrt 
----------------------------------------
<--VRTDataset rasterXSize="5400" rasterYSize="2700"-->
  <--SRS-->WGS84<--/SRS-->
  
<--GeoTransform-->-180,0.066666666666666666,0,90,0,-0.066666666666666666<--/GeoTransform-->
  <--VRTRasterBand dataType="Uint16" band="1"-->
        <--ColorInterp-->Gray<--/ColorInterp-->
        <--SimpleSource-->
          
<--SourceFilename-->world.topo.bathy.200407.3x5400x2700_unref.tif<--/SourceFilename-->
          <--SourceBand-->1<--/SourceBand-->
          <--SrcRect xOff="0" yOff="0" xSize="5400" ySize="2700"/-->
          <--DstRect xOff="0" yOff="0" xSize="5400" ySize="2700"/-->
        <--/SimpleSource-->
  <--/VRTRasterBand-->
<--/VRTDataset-->
---------------------------------------------------------------------------------------




6b)
osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 -o earth.ive
osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 --geocentric -o earth.ive
Both crashes!

But, interestingly, the following with only a slight change (-90° instead of 
180° and 0.0333... instead of 0.0666..) does not crash, but is wrong because 
texture and height don't match, texture covers only half the globe:

5c) gdal_translate reference3.vrt world.topo.bathy.200407.3x5400x2700_ref.tif


Code:

------------------------------- reference3.vrt 
----------------------------------------
<--VRTDataset rasterXSize="5400" rasterYSize="2700"-->
  <--SRS-->WGS84<--/SRS-->
  
<--GeoTransform-->-90,0.033333333333333333,0,90,0,-0.066666666666666666<--/GeoTransform-->
  <--VRTRasterBand dataType="Uint16" band="1"-->
        <--ColorInterp-->Gray<--/ColorInterp-->
        <--SimpleSource-->
          
<--SourceFilename-->world.topo.bathy.200407.3x5400x2700_unref.tif<--/SourceFilename-->
          <--SourceBand-->1<--/SourceBand-->
          <--SrcRect xOff="0" yOff="0" xSize="5400" ySize="2700"/-->
          <--DstRect xOff="0" yOff="0" xSize="5400" ySize="2700"/-->
        <--/SimpleSource-->
  <--/VRTRasterBand-->
<--/VRTDataset-->
---------------------------------------------------------------------------------------




6c)
osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 -o earth.ive
osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d 
srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 --geocentric -o earth.ive
Both work, but first line does not show heigth data in osgviewer, whereas the 
second one does, why?

I tried several other examples, a whole globe from -180° to +180° always leads 
to the application fault.

Can anyone help?

Thank you!

Cheers,
Peter

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27364#27364





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to