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

osgEarth::Features::FeatureTileSourceOptions Class Reference

Inheritance diagram for osgEarth::Features::FeatureTileSourceOptions:
Collaboration diagram for osgEarth::Features::FeatureTileSourceOptions:

List of all members.

Public Member Functions

optional< FeatureSourceOptions > & featureOptions ()
const optional
< FeatureSourceOptions > & 
featureOptions () const
osg::ref_ptr< StyleSheet > & styles ()
const osg::ref_ptr< StyleSheet > & styles () const
optional< Geometry::Type > & geometryTypeOverride ()
const optional< Geometry::Type > & geometryTypeOverride () const
osg::ref_ptr< FeatureSource > & featureSource ()
const osg::ref_ptr
< FeatureSource > & 
featureSource () const
 FeatureTileSourceOptions (const ConfigOptions &rhs=ConfigOptions())
virtual Config getConfig () const

Protected Member Functions

virtual void mergeConfig (const Config &conf)

Protected Attributes

optional< FeatureSourceOptions_featureOptions
osg::ref_ptr< StyleSheet_styles
optional< Geometry::Type_geomTypeOverride
osg::ref_ptr< FeatureSource_featureSource

Private Member Functions

void fromConfig (const Config &conf)

Detailed Description

Definition at line 37 of file FeatureTileSource.


Constructor & Destructor Documentation

FeatureTileSourceOptions::FeatureTileSourceOptions ( const ConfigOptions rhs = ConfigOptions())

Definition at line 32 of file FeatureTileSource.cpp.

Here is the call graph for this function:


Member Function Documentation

optional<FeatureSourceOptions>& osgEarth::Features::FeatureTileSourceOptions::featureOptions ( ) [inline]

Definition at line 41 of file FeatureTileSource.

{ return _featureOptions; }

Here is the caller graph for this function:

const optional<FeatureSourceOptions>& osgEarth::Features::FeatureTileSourceOptions::featureOptions ( ) const [inline]

Definition at line 42 of file FeatureTileSource.

{ return _featureOptions; }
const osg::ref_ptr<FeatureSource>& osgEarth::Features::FeatureTileSourceOptions::featureSource ( ) const [inline]

Definition at line 54 of file FeatureTileSource.

{ return _featureSource; }
osg::ref_ptr<FeatureSource>& osgEarth::Features::FeatureTileSourceOptions::featureSource ( ) [inline]

A live feature source instance to use. Note, this does not serialize.

Definition at line 53 of file FeatureTileSource.

{ return _featureSource; }

Here is the caller graph for this function:

void FeatureTileSourceOptions::fromConfig ( const Config conf) [private]

Reimplemented from osgEarth::TileSourceOptions.

Reimplemented in osgEarth::Drivers::AGGLiteOptions.

Definition at line 67 of file FeatureTileSource.cpp.

{
    conf.getObjIfSet( "features", _featureOptions );
    //if ( conf.hasChild("features") )
    //    _featureOptions->merge( ConfigOptions(conf.child("features")) );

    conf.getObjIfSet( "styles", _styles );
    
    std::string gt = conf.value( "geometry_type" );
    if ( gt == "line" || gt == "lines" || gt == "linestring" )
        _geomTypeOverride = Geometry::TYPE_LINESTRING;
    else if ( gt == "point" || gt == "pointset" || gt == "points" )
        _geomTypeOverride = Geometry::TYPE_POINTSET;
    else if ( gt == "polygon" || gt == "polygons" )
        _geomTypeOverride = Geometry::TYPE_POLYGON;
}

Here is the call graph for this function:

Here is the caller graph for this function:

optional<Geometry::Type>& osgEarth::Features::FeatureTileSourceOptions::geometryTypeOverride ( ) [inline]

Definition at line 48 of file FeatureTileSource.

{ return _geomTypeOverride; }

Here is the caller graph for this function:

const optional<Geometry::Type>& osgEarth::Features::FeatureTileSourceOptions::geometryTypeOverride ( ) const [inline]

Definition at line 49 of file FeatureTileSource.

{ return _geomTypeOverride; }
Config FeatureTileSourceOptions::getConfig ( ) const [virtual]

Gets or sets the name of the object

Reimplemented from osgEarth::TileSourceOptions.

Reimplemented in osgEarth::Drivers::AGGLiteOptions.

Definition at line 40 of file FeatureTileSource.cpp.

{
    Config conf = TileSourceOptions::getConfig();

    conf.updateObjIfSet( "features", _featureOptions );
    conf.updateObjIfSet( "styles", _styles );

    if ( _geomTypeOverride.isSet() ) {
        if ( _geomTypeOverride == Geometry::TYPE_LINESTRING )
            conf.update( "geometry_type", "line" );
        else if ( _geomTypeOverride == Geometry::TYPE_POINTSET )
            conf.update( "geometry_type", "point" );
        else if ( _geomTypeOverride == Geometry::TYPE_POLYGON )
            conf.update( "geometry_type", "polygon" );
    }

    return conf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void FeatureTileSourceOptions::mergeConfig ( const Config conf) [protected, virtual]

Reimplemented from osgEarth::TileSourceOptions.

Reimplemented in osgEarth::Drivers::AGGLiteOptions.

Definition at line 60 of file FeatureTileSource.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureTileSourceOptions::styles ( ) [inline]

Definition at line 44 of file FeatureTileSource.

{ return _styles; }

Here is the caller graph for this function:

const osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureTileSourceOptions::styles ( ) const [inline]

Definition at line 45 of file FeatureTileSource.

{ return _styles; }

Member Data Documentation

Definition at line 64 of file FeatureTileSource.

Definition at line 67 of file FeatureTileSource.

Definition at line 66 of file FeatureTileSource.

Definition at line 65 of file FeatureTileSource.


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