注册 登录
OSG中国官方论坛-有您OSG在中国才更好 返回首页

wanggang8826的个人空间 http://bbs.osgchina.org/?2343 [收藏] [复制] [分享] [RSS]

留言板

facelist

您需要登录后才可以留言 登录 | 注册


xiaol_deng 2013-11-18 16:41
wanggang8826: 你确定earth文件的参数和你程序设置的参数值一样?并且你的earth文件也是在MFC工程中使用的?
要是这样的话,我也不知道问题出在哪里。
通过earth文件配置参数和 ...
是一样的啊,我看了一些资料说通过earth文件加载数据时,osgearth会自动的使用OSG的PagedLOD分页机制,动态调度选择加载区域瓦片节点,从而提高速度。我想知道的是如果我在程序中加载数据,osgearth会不会也像earth文件那样?
谢谢你的回复
xiaol_deng 2013-11-15 22:18
请教个问题,我在MFC程序中是这样加载数据的:
     osgEarth::Drivers::GDALOptions ImagebaselayerOpt2;
        ImagebaselayerOpt2.url()=osgEarth::URI("F:\\OSG\\data\\world.tif");
        std::string DembaselayerName="Dem720";
        osgEarth::ImageLayerOptions iamgelayerOpt(DembaselayerName,ImagebaselayerOpt2);
        osg::ref_ptr<osgEarth::ImageLayer>  BaseImageLayer = new osgEarth::ImageLayer(iamgelayerOpt);
        map->addImageLayer(BaseImageLayer.get());
         osgEarth::Drivers::GDALOptions DembaselayerOpt2;
        DembaselayerOpt2.maxDataLevel()=6;
        DembaselayerOpt2.tileSize()=256;
        ImagebaselayerOpt2.url()=osgEarth::URI(&quot;F:\\OSG\\data\\earth-geotiff.tif&quot;);
        osg::ref_ptr<osgEarth::ElevationLayer>  BaseDemLayer = new osgEarth::ElevationLayer(osgEarth::ElevationLayerOptions(&quot;dem&quot;,ImagebaselayerOpt2));

但是运行起来非常慢不知道为什么真纠结。用earth文件访问这些数据速度就很快,真心不知道这是为什么?求指教
        map->addElevationLayer(BaseDemLayer.get());
          mapnode=new osgEarth::MapNode(map);
          root->addChild(mapnode);
xiaol_deng 2013-7-17 09:17
你好!求教对地图进行切片并建立金字塔显示一个地球。我用osgearth_package工具切片建立了若干金字塔,怎么才能把它们融合起来显示呢?师兄有什么好办法嘛?
OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
返回顶部