|
下面的代码是加载世界国界线和中国省界线的,世界国界线可以加载,中国省界线在使用osgearth_cache命令时报错。
代码如下:
<image name="world_boundaries" driver="agglite">
<features name="world" driver="ogr">
<url>../boundaryData/world.shp</url>
<build_spatial_index>true</build_spatial_index>
</features>
<geometry_type>line</geometry_type>
<relative_line_size>true</relative_line_size>
<styles>
<style type="text/css">
world{
stroke:#ffff00;
stroke-opacity:1;
stroke-width:1.5;
}
</style>
</styles>
</image>
<image name="china_boundaries" driver="agglite">
<features name="chinap" driver="ogr">
<url>../boundaryData/china.shp</url>
<build_spatial_index>true</build_spatial_index>
</features>
<geometry_type>line</geometry_type>
<relative_line_size>true</relative_line_size>
<styles>
<style type="text/css">
chinap{
stroke:#ffff00;
stroke-opacity:1;
stroke-width:1.0;
}
</style>
</styles>
</image>
osgearth_cache报错如下:
F:\osgEarthData>osgearth_cache --seed boundaries.earth --max-level 4
[osgEarth] [TerrainLayer] Layer "china_boundaries" Failed to create "agglite" d
river, but a cache may exist, so falling back on cache-only mode.
[osgEarth]* [EarthSerializer2] Layer "china_boundaries" : Error : Failed to open
a cache for layer because cache_only policy is in effect and bin [a2187a80] cou
ld not be located.
[osgEarth] Seeding layerchina_boundaries
[osgEarth] Seeding layerworld_boundaries
F:\osgEarthData>
附件是两套文件: |
|