|
给位大神,我用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) ); |
|