天道酬勤 发表于 2016-10-29 18:13:48

osgEarth 加载中文路径下的shp数据出不来

给位大神,我用osgEarth 加载中文目录下的shp数据,并且shp数据的名字也是中文的,数据加载不出来,请问怎么解决!代码如下:
Style style;
        LineSymbol* ls=style.getOrCreateSymbol<LineSymbol>();
        ls->stroke()->color()=Color::Yellow;
        ls->stroke()->width()=10.0f;
       std::string path = "C:/一带一路/一带一路示意图shp格式/大图(一带一路)/宝鸡至昆明.shp";
        OGRFeatureOptions featureOptions;
        featureOptions.url()=path;

        AGGLiteOptions rasterOptions;
        rasterOptions.featureOptions() = featureOptions;
        rasterOptions.styles() = new StyleSheet();
        rasterOptions.styles()->addStyle( style );
        mOSG->getMap()->addImageLayer( new ImageLayer("my features", rasterOptions) );

ago 发表于 2016-11-8 15:05:04

系统不支持中文路径,earth文件也不能带有中文路径,

我们在编辑器晟兴地球做了改进,可以支持中文路径。

欢迎下载www.sxsim.com

aniu411 发表于 2016-12-6 22:29:15

同问

xuekai 发表于 2018-1-10 20:02:43

aniu411 发表于 2016-12-6 22:29
同问

请问你解决这个问题了吗,可以给我一段示例代码吗??谢谢!
页: [1]
查看完整版本: osgEarth 加载中文路径下的shp数据出不来