Feature Overlay

This driver uses the osgSim::OverlayNode to drape vector data on the terrain using a projected texture.

NOTE: The OverlayNode is suitable for flat/projected terrain, but is of limited use in a geocentric map. The projected vector data can only cover less than half the globe; plus, the data will "show through" on the opposite side.

Configuration

This driver supports the following sub-elements:

<features> Describes the features to render in the overlay required
<style> Defines overall appearance of the vector data optional
<class> Defines one or more feature classes for categorization of features optional
<texture_unit> Texture unit to use for the projected overlay texture optional, default="auto"
<texture_size> Dimension of the overlay texture optional, default="1024"
<base_height> Base height to use for the osgSim::OverlayNode optional, default="0"

Example

See the feature_overlay.earth sample in the repo

<map name="Feature Overlay Demo" type="geocentric">

    <image name="world" driver="gdal">
        <url>../data/world.tif</url>
    </image>
    
    <model name="states" driver="feature_overlay">

        <!-- Configure the OGR feature driver to read the shapefile -->
        <features name="states" driver="ogr">
            <url>../data/usa.shp</url>
            <ogr_driver>ESRI Shapefile</ogr_driver>
            <geometry_type>line</geometry_type>
        </features>
    
        <!-- Customize the parameters of the projected overlay (osgSim::OverlayNode) -->
        <texture_size>2048</texture_size>
        <texture_unit>1</texture_unit>
        
        <!-- A default feature class for styling the geometry. -->
        <style type="text/css">
            states{
               stroke: #FFFF00;
               stroke-opacity: 1.0;
               stroke-width: 4.0;
            }            
        </style>
        
    </model>
    
    <lighting>false</lighting>
  
</map>

Driver list