osgEarth 2.1.1
|
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) |
Definition at line 37 of file FeatureTileSource.
FeatureTileSourceOptions::FeatureTileSourceOptions | ( | const ConfigOptions & | rhs = ConfigOptions() | ) |
Definition at line 32 of file FeatureTileSource.cpp.
: TileSourceOptions( options ), _geomTypeOverride( Geometry::TYPE_UNKNOWN ) { fromConfig( _conf ); }
optional<FeatureSourceOptions>& osgEarth::Features::FeatureTileSourceOptions::featureOptions | ( | ) | [inline] |
Definition at line 41 of file FeatureTileSource.
{ return _featureOptions; }
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; }
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; }
optional<Geometry::Type>& osgEarth::Features::FeatureTileSourceOptions::geometryTypeOverride | ( | ) | [inline] |
Definition at line 48 of file FeatureTileSource.
{ return _geomTypeOverride; }
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; }
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.
{ TileSourceOptions::mergeConfig( conf ); fromConfig( conf ); }
osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureTileSourceOptions::styles | ( | ) | [inline] |
Definition at line 44 of file FeatureTileSource.
{ return _styles; }
const osg::ref_ptr<StyleSheet>& osgEarth::Features::FeatureTileSourceOptions::styles | ( | ) | const [inline] |
Definition at line 45 of file FeatureTileSource.
{ return _styles; }
optional<FeatureSourceOptions> osgEarth::Features::FeatureTileSourceOptions::_featureOptions [protected] |
Definition at line 64 of file FeatureTileSource.
osg::ref_ptr<FeatureSource> osgEarth::Features::FeatureTileSourceOptions::_featureSource [protected] |
Definition at line 67 of file FeatureTileSource.
optional<Geometry::Type> osgEarth::Features::FeatureTileSourceOptions::_geomTypeOverride [protected] |
Definition at line 66 of file FeatureTileSource.
osg::ref_ptr<StyleSheet> osgEarth::Features::FeatureTileSourceOptions::_styles [protected] |
Definition at line 65 of file FeatureTileSource.