Vertical white stripes on the earth when trying to rotate it

56 views Asked by At

When I set the rotation of the Earth, the render appears with white stripes.

Is this problem caused by my use of GDALImageLayer to load elevation data? Because I found relevant information that GDALImageLayer is static.

If it is the cause, what kind of driver should I use to load tif elevation data?

osgEarth render with vertical white stripes

If it were rendered properly, it would look something like this:

enter image description here

Version info:

enter image description here

main code:

osgEarth::initialize();

m_viewer = this->getOsgViewer();

_terrainLayer = new osgEarth::GDALImageLayer();
_terrainLayer->setURL("D:/OSG/osgearth-master/data/world.tif");
_featureSource = new OGRFeatureSource;
_featureSource->setURL("D:/hqluo/osg/osgearth-3.2/data/boston_buildings_utm19.shp");

if (!_featureSource->open().isOK()) {
qDebug() << "OGRFeatureSource...";
return;
}

_featureModelLayer = new FeatureModelLayer;
_featureModelLayer->setFeatureSource(_featureSource);

_map = new osgEarth::Map;
_map->addLayer(_featureModelLayer);
_map->addLayer(_terrainLayer);

ref_ptr earthMt = new MatrixTransform;

_mapEarthNode = new osgEarth::MapNode(_map);

earthMt->addCullCallback(new EarthRotateCallBack(earthMt));

_modelGroupNodel = new osg::Group;
_modelGroupNodel->addChild(_mapEarthNode);
earthMt->addChild(_modelGroupNodel);

_mapNode = new osgEarth::MapNode;
_mapNode->addChild(earthMt);

Viewpoint vp("home", -90.335, 19, -1376, 0, -90, 10000000);

m_mainCamera->setViewpoint(vp);

m_viewer->setCameraManipulator(m_mainCamera);
m_viewer->setSceneData(_mapNode.get());
0

There are 0 answers