环境:vs2013+osg3.6.5+oe2.10.2
完整的earth文件配置:其中world.tif\world.shp来自oe源码的data目录下(此配置文件将data\目录下的wrold.dbf\wrold.prj\wrold.shp\wrold.shx\wrold.tif五个文件复制到world文件夹下)。world文件夹与.earth文件为同一目录。
<!--
osgEarth Sample - GDAL Driver
Demonstrates the simplest possible use of the GDAL driver to load a GeoTIFF image.
-->
<map>
<!-- 影像数据 -->
<image name="World GeoTIFF" driver="gdal">
<url>world/world.tif</url>
</image>
<!-- 高程数据 -->
<elevation name="World HeighField" driver="gdal">
<url>world/world.tif</url>
</elevation>
<!-- Shp数据 -->
<model name="National boundary" driver="feature_geom">
<features build_spatial_index="true" driver="ogr" url="world/world.shp" />
<styles>
<style type="text/css">
province_label
{
stroke-opacity:0.7;
stroke-width:1;
altitude-clamping:terrain-gpu;
stroke:#FF8C00;
}
</style>
</styles>
</model>
<!-- 文件缓存 -->
<options>
<overlay_blending>true</overlay_blending>
<cache type="filesystem">
<path>./.cache</path>
</cache>
</options>
</map>