osgEarth 2.1.1
Public Member Functions | Private Member Functions | Private Attributes

osgEarth::TerrainLayerOptions Class Reference

Inheritance diagram for osgEarth::TerrainLayerOptions:
Collaboration diagram for osgEarth::TerrainLayerOptions:

List of all members.

Public Member Functions

 TerrainLayerOptions (const ConfigOptions &options=ConfigOptions())
 TerrainLayerOptions (const std::string &name, const TileSourceOptions &driverOptions)
std::string & name ()
const std::string & name () const
optional< ProfileOptions > & profile ()
const optional< ProfileOptions > & profile () const
optional< TileSourceOptions > & driver ()
const optional
< TileSourceOptions > & 
driver () const
optional< int > & minLevel ()
const optional< int > & minLevel () const
optional< double > & minLevelResolution ()
const optional< double > & minLevelResolution () const
optional< int > & maxLevel ()
const optional< int > & maxLevel () const
optional< double > & maxLevelResolution ()
const optional< double > & maxLevelResolution () const
optional< unsigned int > & maxDataLevel ()
const optional< unsigned int > & maxDataLevel () const
optional< bool > & enabled ()
const optional< bool > & enabled () const
optional< bool > & exactCropping ()
const optional< bool > & exactCropping () const
optional< unsigned int > reprojectedTileSize ()
const optional< unsigned int > reprojectedTileSize () const
optional< std::string > & cacheFormat ()
const optional< std::string > & cacheFormat () const
optional< bool > & cacheEnabled ()
const optional< bool > & cacheEnabled () const
optional< bool > & cacheOnly ()
const optional< bool > & cacheOnly () const
optional< std::string > & cacheId ()
const optional< std::string > & cacheId () const
optional< float > & loadingWeight ()
const optional< float > & loadingWeight () const
optional< double > & edgeBufferRatio ()
const optional< double > & edgeBufferRatio () const
virtual Config getConfig () const
virtual void mergeConfig (const Config &conf)

Private Member Functions

void fromConfig (const Config &conf)
void setDefaults ()

Private Attributes

std::string _name
optional< ProfileOptions_profile
optional< TileSourceOptions_driver
optional< int > _minLevel
optional< int > _maxLevel
optional< double > _minLevelResolution
optional< double > _maxLevelResolution
optional< std::string > _cacheFormat
optional< bool > _cacheEnabled
optional< bool > _cacheOnly
optional< float > _loadingWeight
optional< bool > _exactCropping
optional< bool > _enabled
optional< unsigned int > _reprojectedTileSize
optional< double > _edgeBufferRatio
optional< std::string > _cacheId
optional< unsigned int > _maxDataLevel

Detailed Description

Initialization (and serializable) options for a terrain layer.

Definition at line 36 of file TerrainLayer.


Constructor & Destructor Documentation

TerrainLayerOptions::TerrainLayerOptions ( const ConfigOptions options = ConfigOptions())

Definition at line 35 of file TerrainLayer.cpp.

                                                                       :
ConfigOptions( options ),
_minLevel( 0 ),
_maxLevel( 99 ),
_cacheEnabled( true ),
_cacheOnly( false ),
_loadingWeight( 1.0f ),
_exactCropping( false ),
_enabled( true ),
_reprojectedTileSize( 256 )

{
    setDefaults();
    fromConfig( _conf ); 
}

Here is the call graph for this function:

TerrainLayerOptions::TerrainLayerOptions ( const std::string &  name,
const TileSourceOptions driverOptions 
)

Definition at line 51 of file TerrainLayer.cpp.

                                                                                                        :
ConfigOptions()
{
    setDefaults();
    fromConfig( _conf );
    _name = name;
    _driver = driverOptions;
}

Here is the call graph for this function:


Member Function Documentation

optional<bool>& osgEarth::TerrainLayerOptions::cacheEnabled ( ) [inline]

Whether to cache this layer or not.

Definition at line 122 of file TerrainLayer.

{ return _cacheEnabled; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::TerrainLayerOptions::cacheEnabled ( ) const [inline]

Definition at line 123 of file TerrainLayer.

{ return _cacheEnabled; }
optional<std::string>& osgEarth::TerrainLayerOptions::cacheFormat ( ) [inline]

The format that this MapLayer should use when caching.

Definition at line 116 of file TerrainLayer.

{ return _cacheFormat; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::TerrainLayerOptions::cacheFormat ( ) const [inline]

Definition at line 117 of file TerrainLayer.

{ return _cacheFormat; }
optional<std::string>& osgEarth::TerrainLayerOptions::cacheId ( ) [inline]

Explicit cache ID to uniquely identify the cache that matched this layer's tile source properties. This is usually automatically generated but you can override it here.

Definition at line 136 of file TerrainLayer.

{ return _cacheId; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::TerrainLayerOptions::cacheId ( ) const [inline]

Definition at line 137 of file TerrainLayer.

{ return _cacheId; }
optional<bool>& osgEarth::TerrainLayerOptions::cacheOnly ( ) [inline]

Whether to try to run this MapLayer strictly from the cache only.

Definition at line 128 of file TerrainLayer.

{ return _cacheOnly; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::TerrainLayerOptions::cacheOnly ( ) const [inline]

Definition at line 129 of file TerrainLayer.

{ return _cacheOnly; }
optional<TileSourceOptions>& osgEarth::TerrainLayerOptions::driver ( ) [inline]

Options for the underlyint tile source driver.

Definition at line 59 of file TerrainLayer.

{ return _driver; }

Here is the caller graph for this function:

const optional<TileSourceOptions>& osgEarth::TerrainLayerOptions::driver ( ) const [inline]

Definition at line 60 of file TerrainLayer.

{ return _driver; }
optional<double>& osgEarth::TerrainLayerOptions::edgeBufferRatio ( ) [inline]

The ratio used to expand the extent of a tile when the layer needs to be mosaiced to projected. This can be used to increase the number of tiles grabbed to ensure that enough data is grabbed to overlap the incoming tile.

Definition at line 151 of file TerrainLayer.

{ return _edgeBufferRatio;}

Here is the caller graph for this function:

const optional<double>& osgEarth::TerrainLayerOptions::edgeBufferRatio ( ) const [inline]

Definition at line 152 of file TerrainLayer.

{ return _edgeBufferRatio; }
const optional<bool>& osgEarth::TerrainLayerOptions::enabled ( ) const [inline]

Definition at line 99 of file TerrainLayer.

{ return _enabled; }
optional<bool>& osgEarth::TerrainLayerOptions::enabled ( ) [inline]

Whether to render this layer with the map.

Definition at line 98 of file TerrainLayer.

{ return _enabled; }

Here is the caller graph for this function:

optional<bool>& osgEarth::TerrainLayerOptions::exactCropping ( ) [inline]

Whether to use exact cropping if image cropping is necessary

Definition at line 104 of file TerrainLayer.

{ return _exactCropping; }

Here is the caller graph for this function:

const optional<bool>& osgEarth::TerrainLayerOptions::exactCropping ( ) const [inline]

Definition at line 105 of file TerrainLayer.

{ return _exactCropping; }
void TerrainLayerOptions::fromConfig ( const Config conf) [private]

Reimplemented in osgEarth::ElevationLayerOptions, and osgEarth::ImageLayerOptions.

Definition at line 101 of file TerrainLayer.cpp.

{
    _name = conf.value("name");
    conf.getIfSet( "cacheid", _cacheId );
    conf.getIfSet( "min_level", _minLevel );
    conf.getIfSet( "max_level", _maxLevel );        
    conf.getIfSet( "min_level_resolution", _minLevelResolution );
    conf.getIfSet( "max_level_resolution", _maxLevelResolution );
    conf.getIfSet( "cache_enabled", _cacheEnabled );
    conf.getIfSet( "cache_only", _cacheOnly );
    conf.getIfSet( "cache_format", _cacheFormat );
    conf.getIfSet( "loading_weight", _loadingWeight );
    conf.getIfSet( "enabled", _enabled );
    conf.getIfSet( "edge_buffer_ratio", _edgeBufferRatio);
    conf.getObjIfSet( "profile", _profile );
    conf.getIfSet( "max_data_level", _maxDataLevel);
    conf.getIfSet( "reprojected_tilesize", _reprojectedTileSize);


    if ( conf.hasValue("driver") )
        driver() = TileSourceOptions(conf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Config TerrainLayerOptions::getConfig ( ) const [virtual]

Reimplemented from osgEarth::ConfigOptions.

Reimplemented in osgEarth::ElevationLayerOptions, and osgEarth::ImageLayerOptions.

Definition at line 74 of file TerrainLayer.cpp.

{
    Config conf = ConfigOptions::getConfig();

    conf.attr("name") = _name;
    conf.updateIfSet( "cacheid", _cacheId );
    conf.updateIfSet( "min_level", _minLevel );
    conf.updateIfSet( "max_level", _maxLevel );
    conf.updateIfSet( "min_level_resolution", _minLevelResolution );
    conf.updateIfSet( "max_level_resolution", _maxLevelResolution );
    conf.updateIfSet( "cache_enabled", _cacheEnabled );
    conf.updateIfSet( "cache_only", _cacheOnly );
    conf.updateIfSet( "cache_format", _cacheFormat );
    conf.updateIfSet( "loading_weight", _loadingWeight );
    conf.updateIfSet( "enabled", _enabled );
    conf.updateIfSet( "edge_buffer_ratio", _edgeBufferRatio);
    conf.updateObjIfSet( "profile", _profile );
    conf.updateIfSet( "max_data_level", _maxDataLevel);
    conf.updateIfSet( "reprojected_tilesize", _reprojectedTileSize);

    //Merge the TileSource options
    if (driver().isSet()) conf.merge( driver()->getConfig() );

    return conf;
}

Here is the call graph for this function:

const optional<float>& osgEarth::TerrainLayerOptions::loadingWeight ( ) const [inline]

Definition at line 143 of file TerrainLayer.

{ return _loadingWeight; }
optional<float>& osgEarth::TerrainLayerOptions::loadingWeight ( ) [inline]

The loading weight of this MapLayer (for threaded loading policies).

Definition at line 142 of file TerrainLayer.

{ return _loadingWeight; }

Here is the caller graph for this function:

const optional<unsigned int>& osgEarth::TerrainLayerOptions::maxDataLevel ( ) const [inline]

Definition at line 91 of file TerrainLayer.

{ return _maxDataLevel; }
optional<unsigned int>& osgEarth::TerrainLayerOptions::maxDataLevel ( ) [inline]

The maximum level that data should be queried for this layer.

Definition at line 90 of file TerrainLayer.

{ return _maxDataLevel; }

Here is the caller graph for this function:

optional<int>& osgEarth::TerrainLayerOptions::maxLevel ( ) [inline]

The maximum level of detail for which this layer should generate data.

Definition at line 78 of file TerrainLayer.

{ return _maxLevel; }

Here is the caller graph for this function:

const optional<int>& osgEarth::TerrainLayerOptions::maxLevel ( ) const [inline]

Definition at line 79 of file TerrainLayer.

{ return _maxLevel; }
optional<double>& osgEarth::TerrainLayerOptions::maxLevelResolution ( ) [inline]

The maximum level resolution for which this layer should generate data.

Definition at line 84 of file TerrainLayer.

{ return _maxLevelResolution; }

Here is the caller graph for this function:

const optional<double>& osgEarth::TerrainLayerOptions::maxLevelResolution ( ) const [inline]

Definition at line 85 of file TerrainLayer.

{ return _maxLevelResolution; }
void TerrainLayerOptions::mergeConfig ( const Config conf) [virtual]

Reimplemented from osgEarth::ConfigOptions.

Reimplemented in osgEarth::ElevationLayerOptions, and osgEarth::ImageLayerOptions.

Definition at line 125 of file TerrainLayer.cpp.

{
    ConfigOptions::mergeConfig( conf );
    fromConfig( conf );
}

Here is the call graph for this function:

optional<int>& osgEarth::TerrainLayerOptions::minLevel ( ) [inline]

Gets or sets the minimum level of detail for which this layer should generate data.

Definition at line 65 of file TerrainLayer.

{ return _minLevel; }

Here is the caller graph for this function:

const optional<int>& osgEarth::TerrainLayerOptions::minLevel ( ) const [inline]

Definition at line 66 of file TerrainLayer.

{ return _minLevel; }
const optional<double>& osgEarth::TerrainLayerOptions::minLevelResolution ( ) const [inline]

Definition at line 72 of file TerrainLayer.

{ return _minLevelResolution; }
optional<double>& osgEarth::TerrainLayerOptions::minLevelResolution ( ) [inline]

Gets or sets the minimum level resolution for which this layer should generate data.

Definition at line 71 of file TerrainLayer.

Here is the caller graph for this function:

std::string& osgEarth::TerrainLayerOptions::name ( ) [inline]

The readable name of the layer.

Definition at line 45 of file TerrainLayer.

{ return _name; }

Here is the caller graph for this function:

const std::string& osgEarth::TerrainLayerOptions::name ( ) const [inline]

Definition at line 46 of file TerrainLayer.

{ return _name; }
const optional<ProfileOptions>& osgEarth::TerrainLayerOptions::profile ( ) const [inline]

Definition at line 54 of file TerrainLayer.

{ return _profile; }
optional<ProfileOptions>& osgEarth::TerrainLayerOptions::profile ( ) [inline]

Gets the explicit profile setup for this map layer. By default, the layer will try to automatically determine the Profile from the tile source. This property sets it explicitly instead.

Definition at line 53 of file TerrainLayer.

{ return _profile; }

Here is the caller graph for this function:

const optional<unsigned int> osgEarth::TerrainLayerOptions::reprojectedTileSize ( ) const [inline]

Definition at line 111 of file TerrainLayer.

optional<unsigned int> osgEarth::TerrainLayerOptions::reprojectedTileSize ( ) [inline]

The desired tile size to reproject imagery to if necessary.

Definition at line 110 of file TerrainLayer.

Here is the caller graph for this function:

void TerrainLayerOptions::setDefaults ( ) [private]

Reimplemented in osgEarth::ElevationLayerOptions, and osgEarth::ImageLayerOptions.

Definition at line 61 of file TerrainLayer.cpp.

{
    _enabled.init( true );
    _exactCropping.init( false );
    _reprojectedTileSize.init( 256 );
    _cacheEnabled.init( true );
    _cacheOnly.init( false );
    _loadingWeight.init( 1.0f );
    _minLevel.init( 0 );
    _maxLevel.init( 99 );
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 170 of file TerrainLayer.

Definition at line 169 of file TerrainLayer.

Definition at line 177 of file TerrainLayer.

Definition at line 171 of file TerrainLayer.

Definition at line 164 of file TerrainLayer.

Definition at line 176 of file TerrainLayer.

Definition at line 174 of file TerrainLayer.

Definition at line 173 of file TerrainLayer.

Definition at line 172 of file TerrainLayer.

Definition at line 178 of file TerrainLayer.

Definition at line 166 of file TerrainLayer.

Definition at line 168 of file TerrainLayer.

Definition at line 165 of file TerrainLayer.

Definition at line 167 of file TerrainLayer.

std::string osgEarth::TerrainLayerOptions::_name [private]

Definition at line 162 of file TerrainLayer.

Definition at line 163 of file TerrainLayer.

Definition at line 175 of file TerrainLayer.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines